0

I registered my domain foo.org and along with it they gave me foo.biz for free. I don't really like it, but as I said, they gave it to me for free... And I want to route absolutely every request involving foo.biz to foo.biz, including subdomains.

In the DNS configuration of foo.org, I set up @ and www, as well as the wildcard subdomain ***** as A records to my host's IP address,

For the DNS configuration of foo.biz, I was thinking of using 301 redirects but they don't play well with wildcard subdomains, or at least I have no idea how to achieve the automatic mapping I want, i.e., without having to do it manually for each subdomain and not use without the wildcard.

Since I really want to make foo.org. the canonical name and have foo.biz just as a cheap alias, it makes sense to resort to CNAME records, but how can I do that in order to achieve the mapping???

I'd appreciate your most educated advice!

Edit: I'm a DNS n00b... Also, it seems I can only edit my domain's DNS settngs on my registrar's website.

Edit: I'm using IIS.

3
  • 2
    DNS is not capable of doing a "redirect". What you're asking for is not possible. The answer below is how to do a redirect, which is part of the HTTP protocol (again, not part of DNS).
    – Chris S
    Sep 10, 2013 at 19:59
  • Thanks for the advive. But so, does that mean that I am "doomed" to write a redirect rule or URL-rewrite rule on IIS to achieve what I want??? I have to say that I am somewhat incredulous about that fact... Would you recommend then simply going 1 by 1 on my sub-domains instead of using wildcards, and make each subdomain.foo.org the CNAME for each subdomain.foo.biz??? Sep 10, 2013 at 20:43
  • 1
    Sorta yes. The easiest way to do what you want is to have one Rewrite rule in IIS, if the hostname doesn't match whatever you want the canonical name to be, then Redirect to the canonical name. Within each of the other domains, create a "default record" (usually a "@" A Record) which points to the web server. This way a user can type anything.foo.org and the server will get the request, see the wrong name, and redirect to www.foo.biz.
    – Chris S
    Sep 10, 2013 at 22:10

1 Answer 1

0

Add following in front of your foo.org virtual host:

<VirtualHost *:80>
    ServerName foo.biz
    ServerAlias *.foo.biz
    RedirectPermanent / http://www.foo.org/
</VirtualHost>
4
  • I forgot to mention: I'm a DNS n00b... Also, it seems I can only edit my domain's DNS settngs on my registrar's website. Sep 10, 2013 at 18:00
  • 2
    His answer is for inside Apache, not in DNS. Sep 10, 2013 at 18:02
  • Oh, OK, thanks for the clarification. But in that case, since I am using IIS are you saying that I should do this via some Redirect/URL-Rewriting??? Isn't there a DNS solution to this? Sep 10, 2013 at 18:04
  • You have to do this via redirect, if you want the foo.org as result. If foo.biz can stand in the browser, simply let IIS react on both domains and the DNS settings on both domains can be simply the same.
    – Emii Khaos
    Sep 10, 2013 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .