Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was just thinking it would be good to have port numbers with domain name at domain registrars.

For example if I have my site running at port 8000 I mean http://ipaddress:800 then in domain name if I use http://abc.com and port 8000 then I go to my home page

So that I don't have to use http://www.abc.com:8000 so that multiple servers can run in one OS.

Is there any complications in that?

Currently Apache handles that we have to use mod_rewrite things to make them work. But domain name can forward port numbers then that would be reduced

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Yes, there is a complication, namely that domains don't work that way. A domain identifies a host, or a computer. So a domain name resolves to the IP address of that computer. A domain name does not and cannot identify a given port on that computer. It's not a simple text substitution where www.abc.com gets turned in to whatever string you want, it has to be a valid IP address.

What you should really be doing is configuring Apache with multiple virtual hosts so that it will respond to different domains appropriately, all on port 80. The documentation on this can be found here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.