# Help me untangle my DNS issues

**URL:** https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370
**Category:** Factual Questions
**Created:** [January 28, 2008, 10:21pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370 "2008-01-28T22:21:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![toadspittle](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@toadspittle](https://boards.straightdope.com/u/toadspittle)
#### Post date: [January 28, 2008, 10:21pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/1 "2008-01-28T22:21:07Z")

</div>

Here’s the situation. I have a site, mydomain. **com**. I also own the similarly named mydomain. **org**. All of the files are hosted at the mydomain. **com** server. Mydomain. **org** is strictly a domain name, without files of its own.

I want the following to happen:

When person A types in “[http://www.mydomain](http://www.mydomain). **org** /specialpage.html” and person B types in “[http://www.mydomain](http://www.mydomain). **com** /specialpage.html”, they will both be directed to the same page, hosted at the mydomain. **com** server.

But, the .com and .org suffixes in the location bar will remain as they were when the people typed them, so that person A will continue to navigate around mydomain. **org** and person B will continue to navigate around mydomain. **com**.

What do I need to do to my DNS settings in order to accomplish this?

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [January 28, 2008, 10:27pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/2 "2008-01-28T22:27:12Z")

</div>

The only thing you need to change in your DNS settings is to make [yourdomain.org](http://yourdomain.org) point to the same IP as [yourdomain.com](http://yourdomain.com).

Then, you will need to alter your web server configuration to respond to both domains with the same documents, if it doesn’t do so already.

---

<div class="post-metadata">

### Author: ![mks57](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mks57](https://boards.straightdope.com/u/mks57)
#### Post date: [January 28, 2008, 10:28pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/3 "2008-01-28T22:28:52Z")

</div>

I don’t think it’s a DNS issue. Multiple domain names can resolve to the same IP address. It’s the job of the web server software to interpret URLs.

---

<div class="post-metadata">

### Author: ![MrSquishy](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@MrSquishy](https://boards.straightdope.com/u/MrSquishy)
#### Post date: [January 28, 2008, 10:36pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/4 "2008-01-28T22:36:46Z")

</div>

If you’re using Apache, I think what you want is ServerAlias (once you’ve got all the DNS entries pointing to the right place).

---

<div class="post-metadata">

### Author: ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)
#### Post date: [January 28, 2008, 11:42pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/5 "2008-01-28T23:42:51Z")

</div>

The OP wants something slightly different: he wants two seperate sites, but they share a common part. It’s quite easy to set up a simple link from one to the other, but you do change websites. If you want the website name to stay the same while maintaining a common block, that’s rather more tricky. Presumably the common block is non-trivial?

---

<div class="post-metadata">

### Author: ![JimOfAllTrades](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@JimOfAllTrades](https://boards.straightdope.com/u/JimOfAllTrades)
#### Post date: [January 29, 2008, 12:25am UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/6 "2008-01-29T00:25:52Z")

</div>

**friedo** has it right.

Make sure the DNS for each domain points to the same IP address.

Then make sure your web server software directs requests for pages at either domain name to the same “site” on your server.

If you’re using IIS as a server on Windows, this is done using the “Web Site Identification” for the web site. Open IIS Manager, find the web site, right click and select properties, and on the “Web Site” tab, look at the section for “Web Site Identification”. Click the “Advanced” button and you’ll see you can enter any number of URLs that will be directed to this web site. I usually put both the normal URL ( [www.mydomain.com](http://www.mydomain.com) ) as well as the domain only ( [mydomain.com](http://mydomain.com) ).

The URLs can be anything, they don’t have to be similar, or bear any resemblance to the actual domain name. Of course, keep in mind that unless the DNS record for the domain points to your IP, putting [www.google.com](http://www.google.com) in your web site identification isn’t going to grab Google’s traffic. So you would only enter URLs for domains you own. But they can totally different domain names.

One thing to watch out for are links between pages on your site. If your links have the full URL (e.g. pageone.html has a link to [www.mydomain.com/pagetwo.html](http://www.mydomain.com/pagetwo.html)) then obviously the domain displayed in the address bar on the browser is going to be the .com address and not the .org address after you click that link. But if you always use relative links the URL in the address bar will retain the domain name the user started with.

I’m not sure how it’s done in Apache, **MrSquishy** says with an alias.

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [January 29, 2008, 12:29am UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/7 "2008-01-29T00:29:50Z")

</div>

[QUOTE=RJKUgly]

I’m not sure how it’s done in Apache, **MrSquishy** says with an alias.  
[/QUOTE]

It can be done with a ServerAlias, or you can set up two separate virtual hosts pointing to the same document root. The latter configuration offers more flexibility if you want different configurations for each domain. For example, with two separate vhosts, each domain could have its own logfile.

---

<div class="post-metadata">

### Author: ![toadspittle](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@toadspittle](https://boards.straightdope.com/u/toadspittle)
#### Post date: [January 30, 2008, 2:39pm UTC](https://boards.straightdope.com/t/help-me-untangle-my-dns-issues/435370/8 "2008-01-30T14:39:04Z")

</div>

Thanks, all. I’m on Windows, so RJK’s specific info. was very useful. I pointed my .org’s A record at the server’s IP address, and edited the .com’s IIS info. as recommended by RJK. The DNS changes finally went through after 12 hours. Sheesh. Wish I could change that host’s TTL, but they don’t allow it.
