大网数据广告活动
服务器运维问答

Confused on DNS for G Suite + third party web host

· 52CE 我爱测

I've been digging for an answer to my question, but my searches keep turning up edge cases, which surely this is not. As is often the case, Google's own support either over-answers or doesn't provide answers for specific use case…

问题原文

原帖链接 · ghowell · CC BY-SA 4.0

I've been digging for an answer to my question, but my searches keep turning up edge cases, which surely this is not. As is often the case, Google's own support either over-answers or doesn't provide answers for specific use cases. So here I am.

I use G Suite for email, calendars, and docs, and that's pretty much it. I host no web sites with G Suite, nor do I wish to at this time.

I have a third-party web host, with a website ready to launch, and I am trying to get DNS correct for this website.

My single domain, for email and everything else, is groceryoutlet.us

I want to keep my emails flowing through G Suite, but I want the naked domain name and the 'www' domain name to point to my website over at the web hosting company.


Do I really need all those A records for Google's servers?
A       @   216.239.32.21
A       @   216.239.34.21
A       @   216.239.36.21
A       @   216.239.38.21
AAAA    @   2001:4860:4802:32:0:0:0:15
AAAA    @   2001:4860:4802:34:0:0:0:15
AAAA    @   2001:4860:4802:36:0:0:0:15
AAAA    @   2001:4860:4802:38:0:0:0:15

Or do I only need the A record for my web host?

A   @   185.58.213.84

Or both?


I also have this A record:
A   @   74.208.236.253

which appears to be an IP address for the DNS Host I currently use (IONOS).


I already have Google's MX records in place:
MX  @   1    <aspmx.l.google.com
MX  @   5    alt1.aspmx.l.google.com
MX  @   5    alt2.aspmx.l.google.com
MX  @   10   alt3.aspmx.l.google.com
MX  @   10   alt4.aspmx.l.google.com

along with:

CNAME   calendar    ghs.googlehosted.com
CNAME   mail        ghs.googlehosted.com
CNAME   webmail     ghs.googlehosted.com


The web host suggested this as a CNAME record:
CNAME   www      groceryoutlet.us


How do I correctly point my domain to my web host with all these A records, which only seem to muddy the waters?

I don't dip into DNS very often, and any help or critique would be appreciated.

已采纳解答

原帖链接 · Stuggi · CC BY-SA 4.0

If you're using GSuite just for email, you can safely remove all those A-records at the root. The one for your DNS host is probably a parking service (remove all the Google records and see where it leads). Email uses only the MX records, so mail will keep flowing if they are kept in place.

The CNAMEs are just pointing mail.groceryoutlet.us to Google, so you can keep those without issues.

Your records for the website should be an A record for the root and a CNAME pointing at the root (or a A record to the same IP as the root, but it's a bit cleaner to use a CNAME since you only need to update the A record at the root if something changes).

Here's how it should look:

A       @     185.58.213.84
CNAME   www   groceryoutlet.us

A good idea when doing major changes to DNS is to lower the TTL values to 300 seconds (5 minutes) a couple of days beforehand. That way your update will be "instant" instead of the normal 24 hours, so you can see fairly quickly if everything is working, and quickly revert back if something goes wrong.

Also remember to make a copy of all the records you remove to a text file or something in case something stops working and you need to figure out what went wrong.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-04-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。