I'm trying to set up a mail subdomain on my site that will simply redirect to my Google Apps mail account. I thought I could use the Apache 2 vhost configuration below, but it's not working:

<VirtualHost *:80>
  ServerName mail.foo.com
  Redirect 301 / https://mail.google.com/a/foo.com/

What else do I need to get this to work?

1 Answer 1


Do you have a corresponding A record for mail.foo.com. (or *.foo.com.) set?


*.foo.com. 14400 IN A

... or:

mail.foo.com. 14400 IN A

(Where is the IP address of the server running Apache 2)

  • D'oh! Thanks, I knew there was something I'd forgotten! Oct 24, 2010 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.