Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have been with cloudns.net for a few weeks now. Cloudns's UI is very good. Very convenient for newbies. And it has a url redirection ability: you can do a redirect: example.com to www.example.com.

However, cloudns is VERY unstable. Its name servers are always offline with no reason. And it is always upgrading its systems. My site lost a lot of traffic due to its so-called "maintenance".

I am looking for a RELIABLE DNS service with URL Forwarding ability. I want to do a 301 redirect: example.com -----> www.example.com.

UPDATE:

I am using Google App Engine not VPS, so Apache is not an option for me. Note that Google App Engine no longer supports naked domains.

I am with www.zoneedit.com for the time being. It has the web redirection ability I need.

share|improve this question
    
Why not just use a reliable DNS provider (such as that provided by most domain name registrars), and then handle the 301 redirect yourself? –  larsks Jul 7 '11 at 19:22
    
@larsks My registrar is Name.com and it wont allow multiple url forwarding. By the way, I am using Google App Engine not Apache. I dont think it can handle 301 redirect itself. –  DocWiki Jul 7 '11 at 19:29
3  
@DocWiki Apache can most certainly handle 3xx series redirects itself (so can CGI scripts, PHP scripts, etc.) -- Refer to the Apache manual, specifically the Redirect directive: httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect –  voretaq7 Jul 7 '11 at 19:34
1  
@larsks Thanks. But I dont think you have experience with App Engine. App Engine no longer supports naked domain (example.com). code.google.com/appengine/kb/general.html#naked_domain , it says: Due to recent changes, App Engine no longer supports mapping your app to a naked domain. If your domain registrar supports URL redirects, you can redirect from http://yourdomain.com to e.g http://www.yourdomain.com or http://appid.yourdomain.com. –  DocWiki Jul 7 '11 at 19:49
1  
@DocWiki ewwww - when did AppEngine start doing that?? Are you tied to some specific component of Google Apps, or do you have other options? –  voretaq7 Jul 7 '11 at 19:56

2 Answers 2

voretaq7 has the solution. I would move the DNS configuration back to your domain registrar. You should be able to do this with their web interface. You should not need their premium service, although they will likely offer it to you if they can.

EDIT: For google apps you will need to setup a CNAME for www.example.com pointing to the appropriate google apps domain. This is the only data you can configure for www.example.com. Many domain registrars offer redirection of the sites. Configure redirection for the bare domain according to their documentation.

If you can't redirect with your registrar, consider not setting up an A record for your bare domain (example.com). Browsers may add a www. prefix to the the domain when they can't get an address for the bare domain. This should do the required redirection. You will only need an A record if you have a server listening on example.com. For a mail server you need an MX record pointing to the mail server (mail.example.com), but not an A record for example.com.

A last ditch solution would be to find someone willing to run a redirect server for you. (Traffic should be minimal.) Create an A record using their IP address. Instructions for redirecting a virtual host on Apache are at the end of the following solution. DynDNS.com has a webhop service that may do what you want for a fee.

INCORRECT: The following solution is for for hosts supporting bare domains which does not include google apps. which uses CNAMES for the user's domain(s).

Configure example.com and www.example.com with the IP address of your web server. While you are at it you may want to configure SPF records to discourage spammers from using your domain in spam messages. www.example.com should likely have an SPF record like v=spf1 -all. If you do send email from example.com an SPF record like v=spf1 mx ~all or vspf1 mx -all should be appropriate.

If you weren't using Configure your web server to redirect requests to example.com to www.example.com. In Apache you can use the following two lines in you virtualhost configuration:

RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
RewriteRule ^/(.*)         http://www.example.com/$1 [L,R=301]

You could let them browse www.example.com as example.com. Alternatively, you can use the base tag in your page headers to redirect subsequent queries to www.example.com.

<base href="http://www.example.com/" />
share|improve this answer
    
You should have a look at the comments to the question - this isn't a possibility for Google AppEngine, apparently. –  Cypher Jul 8 '11 at 2:47

Snarky Answer:
DNS does not do URL forwarding. DNS has no knowledge of this "301 Redirect" of which you speak, and has no interest in your H-T-T-P verbosity over on port 80, nor these you-are-ell thingies - it only knows name, address, and maybe a few other important conversational words like "food", "bathroom" and "penicillin" .


Non-Snarky Answer:
You can't do what you want with DNS, and DNS probably isn't your problem (if your domain still resolves your DNS is fine - If your site isn't responding it's probably the web server. If your domain is actually falling off the internet you need to RUN, not walk, to another DNS provider. It's REALLY hard to screw up so badly that DNS entries stop resolving - that usually involves long outages...).

Your best option is to invest in a good, reliable DNS provider (most domain registrars will host DNS for you), then invest in a good, reliable web site hosting service (registrars usually have wholly-owned hosting provider subsidiaries), and configure any 301 redirects you require on the web server.

share|improve this answer

Your Answer

 
discard

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.