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.

Background: I redirect my web site's email to a Google Apps account, since Google was giving me much higher uptime and much better spam filtering. But it's a pain to log in from a new PC. You have to go to http://www.google.com/a, find and click on the sliver of a link that says "Returning user? Sign in here", enter your domain name, then enter your username and your password. I just gave my kids their own email addresses on my domain, and this is a lot to ask of them.

Question: So I want to set up a redirect on my website, so they can simply enter the website's url with their name at the end:

mywebsite.com/john

and immediately get redirected to:

https://www.google.com/a/mywebsite.com/ServiceLogin?service=mail

at which point all they have to do is enter their name and password (it would be cool if I could pre-enter their name for them, too, but I haven't been able to figure out if that is possible).

Is there an easy way to do this? I know a little html, but not much beyond that. I don't know anything about apache. So baby steps appreciated.

Aside: I would have expected to be able to go to gmail.com, enter john@mydomain.com as the username, and have google figure out that this is a google apps user and log them in under that domain. But it doesn't seem to work that way (yet, anyway).

share|improve this question

2 Answers 2

up vote 2 down vote accepted

If you have control of the DNS settings for your domain, you should be able to add a CNAME of "mail" directed towards "ghs.google.com", that way you'll only need to give your kids the address of: "mail.yourdomain.com", which automatically directs to "mail.google.com/a/yourdomain.com". I suggest you force https use on your domain (done at the admin control panel of Google Apps) for extra security.

I'd suggest not using an 'auto-populate' approach for your kids' usernames. It's always best not to peal any layer of security if it's not truly needed. Plus, you'd be surprised how much (and how fast) they can learn system procedures!.

share|improve this answer

a) If you type the following into you address bar, then Google will at least know your domain. If you're not logged out, it remembers your username too, so you just have to type the password.

https://www.google.com/a/<yourdomain.com>/

b) Next, you can of course just do a plain HTTP redirect from your own site to the right Google URL. You didn't state which programming languages your website supports.... Assuming you have PHP, which is a fair guess, then something like this will work:

<?php
Header( "HTTP/1.1 302 Found" );
Header( "Location: https://www.google.com/a/<yourdomain.com>/" );
die();
?>

Place the above in a file named index.php in a directory of your choosing on your webserver.

c) A 3rd way to go is redirects by whoever hosts DNS for you. Most DNS hosting can set up a redirection on subzones, i.e. gmail.yourdomain.com --> https://www.google.com/a/yourdomain.com/ . They do this by hosting a webserver for you with the proper programming to send out the right headers, much like above. How to set this up will depend on your DNS host.

Lasty, l0c0b0x suggestion to set Google Apps to force HTTPS is a good one, even if you normally remember the https prefix.

Adding a CNAME on your own domain for "ghs.google.com" works too, and is one of the ways Google suggest. The only little drawback here is that if your users initially request a secure connection (by using the https: prefix), then this fails as Google doesn't have a certificate for "mail.yourdomain.com" installed.

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.