使用带有Heroku和CNAME的电子邮件 [英] Using email w/ Heroku and CNAME

查看:148
本文介绍了使用带有Heroku和CNAME的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有两个CNAME的设置:

  @ myapp.herokuapp.com 
www myapp.herokuapp.com

网站可以正常工作。我现在正尝试通过添加Google Apps MX记录来添加电子邮件支持。

  @ ASPMX.L.GOOGLE.COM。 MX 10 1800 

- 以及其他四种MX后退 -



Google Apps表示无法读取MX记录。这是因为他们与@ CNAME记录冲突吗?如果是这样,我应该放弃并使用Naked Domain方法(改为设置三个A记录)。 Heroku使得这种方法听起来像是非常不鼓励用@非WWW的CNAME。



感谢您的帮助!

解决方案

我发现最好的方法是使用Google AppsNaked Domain301重定向功能,如> https://support.google.com/a/answer/2518373?hl=zh_CN



1)转到管理控制台 - 域名 - 更改裸体重定向



2)重定向到WWW.your_domain.com

3)您将在您的DNS中设置4个A记录,将your_domain.com指向


  • 216.239.32.21

  • 216.239.34.21

  • 216.239.36.21
  • 216.239.38.21


现在,当有人指向your_domain.com时,他们会将301重定向到WWW.your_domain.com
这与bouo.com的行为方式相同(301重定向到www。 google.com)



HT:http://smallchou.com/post/41388058201/heroku-and-root-aka-apex-or-naked - 域名


I am in the process of setting up MX records on a HEROKU hosted app and am running into issues.

I have two CNAME's setup:

@ myapp.herokuapp.com
www myapp.herokuapp.com

Site works fine as setup above. I am now trying to add email support by adding Google Apps MX records.

@ ASPMX.L.GOOGLE.COM.  MX 10 1800  

--as well as four other MX fall backs--

Google Apps is saying it can't read the MX records. Is this because they are conflicting with the @ CNAME record? If so, should I drop that and used the "Naked Domain" method (Setup three A records instead). Heroku makes it sounds like this method is highly discouraged vs CNAMEs for "@" non WWW.

Thanks for the help!

解决方案

I found the best way to do this is to use Google Apps "Naked Domain" 301 Redirect Feature as described in https://support.google.com/a/answer/2518373?hl=en

1) Go to Admin Console - Domains - Change Naked Redirect

2) Redirect to WWW.your_domain.com

3) You will setup 4 A-Records in your DNS pointing your your_domain.com to

  • 216.239.32.21
  • 216.239.34.21
  • 216.239.36.21
  • 216.239.38.21

Now, when somebody points to your_domain.com they get 301 redirected to WWW.your_domain.com This, btw is the same way gooogle.com behaves (301 redirect to www.google.com)

HT: http://smallchou.com/post/41388058201/heroku-and-root-aka-apex-or-naked-domains

这篇关于使用带有Heroku和CNAME的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆