Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to forwarding bare domain to www.domain for google app hosted site

I am in the process of porting some sites from my own server to Google (GHS). I've always used ZoneEdit to manage my DNS needs and in the past - wrongly or rightly - configured it so that:

domain.com and www.domain.com pointed to: <my known ip address>

With the www sub-domain all is fine and it (www.domain.com) resolves to ghs.google.com (via a CNAME entry) and the site is displayed.

However, if I try and reach the bare domain (domain.com) FF states it is unable to establish a connection. I assume this is because my DNS configuration has no A ip-address entry for it anymore.

I was considering forwarding any URL from domain.com to www.domain.com, although possible ZoneEdit is not recommending it I think because I telling it to only forward requests for http://domain.com and leave http://www.domain.com as it is (i.e CNAME configured).

Am I handling this the best way?

Please advise.

like image 452
JARC Avatar asked Jan 12 '10 10:01

JARC


People also ask

How do I forward a domain to www?

Select the Redirects icon under the Domains area of your cPanel home page. Keep the Type as the default, Permanent(301). Select your domain name from the drop down menu on the next line. In the redirects to text box, type in the full URL of your domain, including www (e.g. http://www.yourdomain.com).

Can I forward a domain name without hosting?

If you happen to not have a hosting plan and you would like to redirect your domain to another domain, it can be easily done using Cloudflare.


4 Answers

You could also add your vote to Issue 777: Officially Support Naked Domains for GAE Apps to ask Google to support naked domains. That way you would also be able to use http://domain.com as a valid address for your App Engine application.

like image 167
Emilien Avatar answered Nov 03 '22 00:11

Emilien


According to the article on URL forwarding in the Google Apps Help, forwarding your naked domain to the www domain is the best way to handle it.

And then you leave the CNAME record for the www domain to point to ghs.google.com, as you already have done.

like image 43
Tom van Enckevort Avatar answered Nov 03 '22 02:11

Tom van Enckevort


You can also look at the post 'Naked' domains on App Engine by Nick Johnson

like image 44
padn Avatar answered Nov 03 '22 00:11

padn


Now there is a direct way within Google Apps to do this.

It is located in Gooogle Apps > Domain Settings > Domain Names

https://www.google.com/a/cpanel/yourwebsite.com/DomainSettingsDomains

Requisite : Your 'A' Records should point to the google server.

How it works?

  1. User types yourwebsite.com
  2. DNS sends it to the server whose IP is mentioned in the A Record
  3. That server (Googles host server), takes the domain name and redirects to www.yourwebsite.com (or the sub-domain / link you specify)
  4. User reaches www.yourwebsite.com

From there you know ...

like image 32
Rahul Avatar answered Nov 03 '22 00:11

Rahul