Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Two IPs, One Domain

Have 2 IP address and want to use the same domain name for both

6:26 pm on Apr 17, 2007 (gmt 0)

New User

5+ Year Member

joined:Jan 28, 2007
votes: 0

I'm posting this in general b/c it seems to span so many categories.

I work for a company that is currently developing a new corporate site. We are nearing completion, but have a slight hurdle to overcome. In creating our new version, we have opted to add MovableType to manage a blog, company news, careers, and more. The issue we ran into was that we just spent a lot of money developing our new site in ASP.NET, so our main site will be on a Windows Server. We need to keep the ASP portion of the site as is in order to maintain our portfolio page and other pages on our site. Due to a number of other reasons we could not load MovableType to that server, so we ended up getting a second hosting plan on a UNIX server and are hosting all of our blogging items there.

This basically means that our site is now split over 2 IP addresses (one UNIX-MySQL with PHP, one Windows IIS-MS SQL with ASP.NET). There is no duplicate content on the UNIX and Windows servers, they both hold unique items. We basically link back and forth between the two IPs (we haven't pointed the NS over yet, only in testing phase) depending on what you are accessing:

-blogging on UNIX
-home page, portfolio, and all non-blog items on Windows

Ideally we don't want users who come to our main page (domain.com) and click on one of the blogging links to be routed to IPNumber/blog, so how can we have our domain manage both IP addresses so that when a user clicks on the blog link it takes them to domain.com/blog, instead of the IPNumber/blog. Is the only option to do subdomains (blog.domain.com and articles.domain.com)? Obviously we do not want to damage our search engine ranking so we need to use caution with how we do this to avoid any major hit to our current set-up. While the blog is new, we do currently have many articles/newsletters archived on our site in subdomains:


The ideal would be to keep those paths and not have to create subdomains for them instead, but not sure how that would be done. And so I come to the Hall of Masters and seek your advice. If you need more info let me know and Ill explain the details further. Has anyone done this before? How, and did it work well?

Thanks, yall.

6:42 pm on Apr 17, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 16, 2003
votes: 0

You could use a reverse proxy running on your Unix server forwarding requests to the appropriate server based on request URL. You map the URL space from the two servers to a common URL space under your main domain name.

Both your servers would then need to generate relative URLs to fit in the common URL space. The reverse proxy would not touch the content of pages being sent to browsers.

[edited by: Gorilla at 6:52 pm (utc) on April 17, 2007]

6:55 pm on Apr 17, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member ogletree is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 14, 2003
votes: 21

This is just a simple DNS issue. All you have to do is set up a CNAME. This would give you


This is a little different than what you asked but I think it is better. Google will treat each sub domain as a different website. This way you can rank several times for the same search result. It will also be seen as links between different sites as opposed to internal links.

If you want sub folders you can set up IIS so that it points a directory to a different IP.

7:02 pm on Apr 17, 2007 (gmt 0)

Moderator from US 

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 10, 2005
votes: 29

I also vote for blog.domain.com method and keep everything else the way it was. Any old files that are being moved to the new server need to be 301 redirected so you can keep the pages in the SEs.
9:20 pm on Apr 17, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 26, 2005
votes: 0

All you have to do is set up a CNAME.

Actually, a CNAME won't do this. You need an A record for each host.

CNAME records are used to point one domain to another domain name, as opposed to an IP address.

Technically, these are not "subdomains", but simply multiple hosts. It's only a subdomain if there are multiple hosts under a subdomain name.


Are three hosts in the example.com domain.


us.example.com and corporate.example.com are subdomains. www.us.example.com, www2.us.example.com, blog.us.example.com are hosts in the us.example.com subdomain.

Each of the hosts listed above would need an A record, pointing to the IP addresses of each host.

A CNAME is used when you want to create an "alias" for a host. For example, you have www.example.com, and, for whatever reason, you ALSO want to refer to the same host as foo.example.com. Or www.example2.com. You can use either an A record or a CNAME to accomplish this. The advantage of the CNAME is that if the IP address of www.example.com changes, you only have to change it in one place (the A record for www.example.com), rather than 2. The disadvantage is a small penalty in the time it takes to resolve the domain name in some cases.

(My preference is to always use A records and avoid CNAMEs, unless there need to be some many domains pointing to the same host that it would be an extreme inconvenience if the IP address ever changes. I alway use A records pointing to the same IP for www/non-www.)

Anyway, two ways to do this are, as already stated:

1. Use multiple A records to create multiple hosts under your domain name.

2. Use a reverse-proxy running one one or the other of the machines to forward traffic to the other. this way you can avoid having to expose multiple hosts to users.

You could, of course, run the reverse-proxy on a third machine.

8:55 pm on Apr 18, 2007 (gmt 0)

New User

5+ Year Member

joined:Jan 28, 2007
votes: 0

Cool. This was kind of where I was leaning (creating the blog.domain.com A records), but really wanted to get a second opinion on the best course of action. No matter how we run it we are probably going to be altering the path so the SEO will just have to adapt. We have enough unique content that we will quickly bounce back.

I will let you know how it turns out.

Thanks again!