为GitHub页面设置DNS以避免邮件服务器冲突

我想build立一个github用户页面。 我已经创build了回购,现在我需要更新我的DNSlogging。 我目前有以下的DNS条目:

MX Records mail.example.com A Records 123.45.67.89 (assume this is the default a record) mail 123.45.67.89 www 123.45.67.89 CNAME None 

我想我的github页面显示在example.com上。 我是否更新www和默认Alogging到github IP,并让邮件指向现有的IP?

如何将转到www.example.com的用户redirect到example.com?

是的,您可以保留mail IP。 您可以删除wwwlogging并将其设置为example.com的CNAME。 然后,按照帮助页面中的说明,将“默认”logging更改为GitHub IP。 GitHub将处理redirect。

他们的文档没有提到邮件。

您只需将mail Alogging设置为您需要的地方即可。 这不会伤害其余的。

根据他们的文档,www =>裸域redirect不是内置的。为了得到这个,你必须处理页面内容本身的redirect,如果可以的话。

假设你的github页面的域名是user.github.com ,那么把user.github.com CNAME设置为user.github.com ,把example.com设置为user.github.com的IP地址

不要打扰你的邮件logging。 如果您想将转到www.example.com用户redirect到example.com请查看https://stackoverflow.com/questions/12011521/redirect-www-example-com-to-example-com