0

My company use a domain registrar who also offer a web forwarding service.

We have a large number of different domain names purchased over the years and are using this web forwarding service to allow us to forward on requests to old domain names to a suitable location on our main website, as follows:

  • User browses to www.an-old-domain.example
  • www.an-old-domain.example resolves via DNS to the IP of our registrar's forwarding server.
  • The web forwarding server has been set up to serve an HTTP 302 redirect from www.an-old-domain.example to www.our-corporate-website.example/some-page
  • The user is redirected to www.our-corporate-website.example/some-page which in turn resolves via DNS to the IP of our web server

We're having a few problems with the reliability of this redirection service and I was wondering whether it would be OK to create a DNS A record for www.an-old-domain.example to resolve to www.our-corporate-website.example/some-page, which in turn resolves to the IP address of our web server.

I've always thought that DNS A records should resolve to an IP address rather than a URL, thereby creating a chain of DNS entries. A colleague tells me they that this approach is fine however, but I'm suspicious that it's a bit of a hack.

  • An A records maps a name to an IPv4 address, never to an URL. So "create a DNS A record for www.an-old-domain.example to resolve to www.our-corporate-website.example/some-page" makes no sense you can just make www.an-old-domain.example resolve to the same IP than www.our-corporate-website.example and configure this webserver to reply correctly to queries on this name, redirecting them as needed. – Patrick Mevzek Aug 19 '18 at 23:46
1

If you are not using the old domains you should be using a 301 permanent redirect not a 302 temporary (The requested resource resides temporarily under a different URI), you're losing link juice using 302's.

One solution is to setup a shared hosting account on hostmonster or another unlimited hosting provider. Have all your old domains use an .htaccess file to do the 301 to the specific path on your new domain.

Or take a look at the redirect hard link option from dnsmadeeasy http://help.dnsmadeeasy.com/record-entry/http-redirection/

Amazons Route 53 is pretty nice as well and very cheap compared to most other DNS management services.

There's also a few suggestions on redirecting DNS to a file on SO https://stackoverflow.com/questions/6507640/using-dns-to-point-a-domain-to-a-specific-page

Nothing fancy though you'll get the same redirect with the .htacess method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.