-5

Meet Oliver. Oliver wants to start his own restaurant "Fancy Flavours", and a website to match. He wants to purchase the domain fancy-flavours.co.uk, but knows that he should allow for spelling differences in American vs British English: "flavours" vs "flavors".

Rather than host two different websites, is it possible to silently redirect anyone who tries to use the misspelled fancy-flavors.co.uk to the "proper" website?

I'm very familiar with HTML redirection, but I was wondering if this is possible at a domain-level, so it applies to ALL traffic?

One benefit of this is, for instance, if Oliver wants to add a new subdomain, mail.fancy-flavours.com, he doesn't need to mirror these DNS changes across the two different DNS registries.

fukawi2
  • 5,396
  • 3
  • 32
  • 51
IQAndreas
  • 1,550
  • 2
  • 20
  • 39
  • 1
    Yes, it is possible. In fact, your own web site already does it, by sending a 301 redirect for iqandreas.com to www.iqandreas.com. – Michael Hampton Sep 24 '15 at 00:55
  • @MichaelHampton But isn't that only for HTTP? For instance, if I tried to send an email or connect with `ssh` or `netcat`, would it still redirect properly? – IQAndreas Sep 24 '15 at 15:17
  • You don't need redirection. You can just point both domain names to the same IP addresses. – kasperd Sep 26 '15 at 10:20

3 Answers3

1

Don't think it is possible at a DNS level. DNS helps to points domains and subdomains to IPs. You may use wild cards like *.example.com, to point all subdomains to an IP though.

At a URL level, as Michael mentioned, you can use 301 redirects. There also, you can have wild cards - example.com/anything can be redirected to www.example.com/anything or vice versa. Your server control panel should support this or you could use .htaccess Help can be found in this URL.

Alex
  • 11
  • 2
0

Assuming you use BIND and host your own DNS, this is somewhat possible. Both zones can be served from the same zone file -- you'd still have to accomodate both domains in your web/mail servers though. In your zone file you would always want to refer to your domain name with an "@" rather than the actual domain name (fancy-flavours.co.uk. or fancy-flavors.co.uk.). Then in your named.conf you would specify the same zone file for both domains.

If you're using a 3rd party DNS hosting provider, this will likely be more difficult to do without direct access to the zone(s) and configuration files.

Whether it's worth the trouble to do this for a limited number of DNS names is a question only you can answer.

Brandon Xavier
  • 2,022
  • 13
  • 15
0

There are plenty of workarrounds to get the same net effect, but silent redirection without involving a web server is not possible. (It is possible to have the same webserver answer for all the versions of the domain name, rather then redirecting them)

davidgo
  • 6,222
  • 3
  • 23
  • 41