Google Apps‎ > ‎

URL Redirect


When you use Google Sites out-of-the-box you will end up with site URLs like these.

http://sites.google.com/a/praqma.net/www
http://sites.google.com/a/praqma.net/acc

And even if you got them for free, and the sites looks nice, you are probably not entirely content with those URLs. They are too long, too much google, too little "My company".

Well, fortunately Google Sites does provide a nice feature for "mapping" a 3rd level domain name URL agains the  pointing at your sites:

http://www.praqma.net
http://acc.praqma.net

When you are logged into your Google Site you go: More Actions -> Manage Site -> Site Settings, General -> Web address Mapping, Map this site.

The only thing you need to be aware of when you do this mapping is, that Google Site will require that you arrive at the site with the right header information, and therefore you must have a CNAME DNS setting poitnting like this:
howto.praqma.net -> ghs.google.com

..or it will not work.

There are a few different ways you can set this up, and some of them are smarter than others. We have another article going into details about setting all the DNS settings right for Google Apps. What is really interesting for the remainder of this article is how to deal with the 2nd level domain name, or what is also sometimes referred to as the naked  domain name.

Google Sites can not handle naked domain names out-of-the-box

For reasons not revealed to lay-men Google has chosen not to support 2nd level domain names in their mapping feature for Google Sites. Therefore we must treat it as an odd case.

This thing is with webservers that are hosting many websites like Google's that thy all wan to reply on port 80. But simply adressing the server by it's IP address on port 80 would not leave place for more than i single site. Therefore the webserver uses header mapping as well. Basically it means that you are not just entering the server with a bare IP addresse, but also information about what DNS name you used to map this IP address. And that is what gives you access. So, if your header says www.praqma.net:80 you'll get access to the site if it's mapped to answer to that header.

But if your header says praqma.net:80 then it will not answer your request. Therefore we need a mechanism that will transform praqma.net to www.praqma.net. This mechanisme is a called a redirect or a URL forward and for that to work you need another service in-between.

Luckily you are not the only one who had this issue, so it's quite standard how to set this up - you need help from your DNS server!

You'll need an URL forward

If you use a Do-It-Yourself DNS service, then you need to create a URL forward record substituting your named domain name with the one you want to default to: praqma.net -> www.praqma.net. If you don't have access to your DNS settings, then you must ask your ISP to set it up for you.

The URL will redirect the naked domain  name to a website (typically run by your ISP or your DNS hosting-guys) This website will then look-up where you wanna go (from the DNS record you created) and then send you there - with the new correct header information.

You can use the same technique to redirect multiple domain names into one like this:
praqma.dk -> www.praqma.net
www.praqma.dk -> www.praqma.net
praqma.com -> www.praqma.net
www.praqma.com -> www.praqma.net
Keywords:
Goolge Sites
URL forward
URL redirect
Naked domain name
2nd level domain name
Comments