11

I know this is easy with a 301 redirect in the apache config, but I'm looking for a 3rd party service that can do this cheaply or free. I'll be using this to redirect non-www traffic to a www record I've CNAME'ed to an Amazon Elastic Load Balancer hostname.

offthree
  • 119
  • 1
  • 3

4 Answers4

6

Yes - two which are free are arecord.net and wwwizer.com First requires email confirmation and signup second seems better/easier - IP is provided on the homepage.

What I'm still searching for: a free redirect service out there which you can point to via A/CNAME record, and it will allow you to redirect to ANY destination URL!

Mike Schroll
  • 161
  • 1
  • 2
  • 3
    Try using https://redirect.name/ which you just add a CNAME or A record of the alias like `CNAME | github | alias.redirect.name` and then a TXT record like `TXT | _redirect.github | "Redirects to https://github.com/holic/redirect.name"` and it works. NO Account sign up is needed and no database on the service end is required. – Joseph Shih Sep 08 '18 at 01:15
  • https://redirect.name/ is a very good one, thanks! – Vadorequest Jan 01 '19 at 11:22
  • There is also https://redirectssl.com/ - _disclosure I am the creator of said product._ – Steven Apr 03 '20 at 18:42
4

You should make this a HTTP 301 Moved Permanently redirect, as you mention.

Most DNS hosting services have this, so the first place to look would be your current DNS host / DNS service provider. There doesn't seem to be any agreement on what to call this -- GoDaddy seems to call it "forwarding", Gandi calls it "Web Forwarding".

If your DNS service provider doesn't have this, then the simplest solution would probably be to either:

  1. Find a super inexpensive web host like Nearly Free Speech, assign the root @ to this host's IP, and use PHP/.HTACCESS as you mention, or
  2. Switch to another DNS service provider.

.. at least I'm not aware of any (large, reputable) services which just do HTTP redirects without doing something else too, like DNS.

  • 1
    NearlyFreeSpeach's UI is insanely unintuitive, and their FAQs don't help. But I've done this successfully by creating a "Site", specifying my naked domain for it on creation (they call it an "Alias"), and SFTPing my .htaccess file to it. Make sure to change the Site's "type" to "static", and NFS only charges for storage, which is practically nothing. – Jonathan Tran Jan 15 '13 at 01:01
1

Amazon's Route53 DNS service supports pseudo-A records for an ELB instance (they call them "ALIAS" records).

ceejayoz
  • 32,469
  • 7
  • 81
  • 105
-1

Well... Why don't just add a record like

$ORIGIN domain.com.
@               IN A            1.2.3.4
www             IN A            1.2.3.4

Into your DNS zone file?

HUB
  • 6,322
  • 3
  • 22
  • 22
  • 4
    Because of the Amazon Elastic Load Balancer service, which only supports DNS CNAME's. CNAME's are currently not valid for the @ (2nd level). –  Apr 01 '11 at 18:53
  • Thanks. I didn't know it. Will be a lesson for the future. ;) – HUB Apr 04 '11 at 06:54