homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

One IP address two web site
Browser shows the same name even domain name portions of URLs differ

 3:18 pm on Jun 13, 2008 (gmt 0)

My company uses one IP address to host two web sites, let say www.domain_1.com and www.domain_2.com. They are in two different languages and completely independent in terms of content.

I've been analyzing two web sites and found a strange thing.

Let say, there are two home pages:


The strange thing is when I replace domain portion of URL like:

[domain_2.com...] - (replaced "domain_1" with "domain_2") I get the same page as I used "domain_1".

I am not a DNS guru. Any help in explanation of how it happens greatly appreciated.




 12:38 am on Jun 15, 2008 (gmt 0)

That's probably because they are on the same server. I'm no expert on this either, but my gut feel is that you would need to set a different root folder for each site.


 3:47 am on Jun 15, 2008 (gmt 0)

This is not a DNS issue both domains correctly point to the same IP.

As webfoo says it is to do with server configuration. Check if [domain_1.com...] and [domain_2.com...] without any file or path give the same page, also check if any redirection is happening that is when you enter say [domain_1.com...] does it stay as [domain_1.com...] or something else.

Do you know what kind of web server it is, apache ?


 5:04 pm on Jun 15, 2008 (gmt 0)

You need to set different webroots / documentroot for each domain. This is also known as virtual hosting under IIS / Apache.


 1:37 pm on Jun 16, 2008 (gmt 0)


Thanks for your responses.

If I type [domain_1...] I get redirect to the [domain_1...] and so on to the home page. If I replace domain_1 with domain_2 and do not change folder 's path I get the same page.

If I type [domain_1...] and domain_2 I get two distinct pages which belong to the corresponding domains.

Ip address is the same for two domains.


 8:50 pm on Jun 16, 2008 (gmt 0)

Is this actually a problem, or is it just an annoying nag you can't figure out?


 9:29 pm on Jun 16, 2008 (gmt 0)

Webfoo, I believe this is a potential problem for our web sites. I want to escalate this case to my boss but without understanding the matter it will be difficult to be persuasive.
I am not in charge for web server configuration but I saw the issue and when posting I believed that it would be a simple answer to it. I see now that I need more info about serverís setting.

Thanks everybody


 9:58 pm on Jun 16, 2008 (gmt 0)

Himalayswater is correct - it's an apache config problem. It may be the document root, could be something else,but it's certainly in that neighbourhood - likely in httpd.conf.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved