Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My main domain is, but also bought and I've configured my webservers at * to handle requests from the other domains and redirect them correctly to, but I'd rather not re-configure all my DNS records at and to be the same as

Other than writing some ugly synchronization script, what should I do to have route53 answer queries against my "other" domains with the same data from the "main" domain?

share|improve this question
I do not know if this is the only answer, but I simply ended up coping over everything... Ugly and tiresome solution. Would be nice to see better solutions. – Grumpy Dec 11 '12 at 12:40
I know it's pedantic, but and are not identical domains. The suffix implies no relevance to any other domain. A trait spammers and cyber-squatters just love. – Sirex Dec 13 '12 at 19:36
@Sirex yep, that's why we're buying our brand's 'name' for other TLDs. You and I may know that and aren't the same, but maybe my users don't know that... – Yaniv Aknin Dec 13 '12 at 20:35
up vote 1 down vote accepted

I'm going through the same. Have you considered a simple URL redirection service? Do you want *.org and *.net to be rewritten to the *.com address?

If so, it seems like a redirect at the registrar level may be the cleanest solution.

Also see:
Redirect all traffic from to at the DNS level
How do setup DNS based URL forwarding in Amazon Route53?

share|improve this answer
I've considered a registrar's redirection service, but since I may have many (say, 15) alias domains from more than one registrar, I was hoping for something more robust... Lets wait a bit to see if someone comes up with a better solution, though I'm having doubts by now. – Yaniv Aknin Dec 12 '12 at 6:05

This is a common requirement for one of our clients. They will often buy 10-15 domains related to a campaign, one of which will be the "root" domain to which all others point. @ewwhite is correct that the cleanest solution is setting up DNS for only the root domain and just using forwarding at the registrar level for all the rest.

But to be clear: there's no way to do redirection like this using Route53, or to use wildcards with domain names themselves.

If you something that you control on your end of things, I would suggest pointing all the "extra" domains to the IP of a server that you can run Apache or NGINX on, and then create a site with a simple config (it doesn't need a webroot at all) that listens for all of those names and redirects automatically.

In Apache, within your <VirtualHost *:80> section for this site, you need only three lines:

ServerAlias *.mydomain.* myotherdomain.* *.myotherdomain.* yetanotherdomain.*
Redirect 301 /

In NGINX you can do this even more easily, within a server declaration:

server {
    server_name ~^(www\.)?(mydomain.+)$;
    rewrite ^;

I should also note that one cool advantage of running your own redirects like this is that you can parse the log and get decent analytics on how many people hit your site via those different paths. I've even known of companies seeding different audiences (or marketing channels) with different domain names, so that they know who would be coming in under each name. In that case you would probably want to make that a 303 redirect in the Apache config above.

share|improve this answer
Thanks, but I think the question already says "I've configured my webservers at * to handle requests from the other domains and redirect them correctly to"; that's not the issue at hand. As for registrar forwarding, see my comment to @ewwhite's answer. – Yaniv Aknin Dec 13 '12 at 20:33

Your Answer


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.