- Newest
- Most votes
- Most comments
I get that part, but in the subdomain hosted zone, you can't have a CNAME and MX record. I have the subdomain hosted zone working fine with the NS records setup in the parent domain.
But my question now, is how can I have a CNAME record for mail.company.com that points to the hubspot provided domain AND MX records for mail.company.com that point to the gmail servers? Route53 gives me this error: "Bad request. (InvalidChangeBatch 400: RRSet of type CNAME with DNS name mail.company.com. is not permitted at apex in zone mail.company.com.)
Here are the hubspot add domain instructions: https://knowledge.hubspot.com/domains-and-urls/connect-a-domain-to-hubspot
The main issue is they only provide A records if you are connecting a root domain. I have no idea why, but that is what they say and when I try to add the domain it only gives me cname record to update without an A record option. You'll see their warning in the 5th bullet of the page above.
Thanks I’ll have a read.
Hubspots documentation says www.Blah.com is a subdomain. Some people call it a subdomain when it’s just a CNAME record in the root domain. I call a subdomain a full blown domain in its own zone like you’ve setup.
What I would do is any where it says Domain/root domain use your subdomain eg mail.company.com
If you had www.mail.company.com the. Treat that as a subdomain but create a CNAME in mail.company.com
I’ve a feeling that would work for you. I think their documentation is missing some points. See how you get on.
Good idea. I tried, but of course Hubspot won't even let you type in "mail.company.com" in the root domain field. :facepalm: Looks like due to dumb hubspot limitations this may not be possible.
Subdomains is possible. This is natively how DNS works.
If you have setup a subdomain zone in route 53. Then create the NS records in the parent domain to point to the name servers in the sub domain.
Then just create the MX record etc in the sub domain zone.
.com is a domain and your domain company is a subdomain of .com. mail.company.com works in the exact same fashion.
In DNS it’s impossible to have a CNAME in the APEX of a domain. It has to be an A record. AWS have support for aliases in route53.
You can have a cname for www.mail.company.com without an issue.
https://kb.isc.org/docs/aa-01640
MX records in subdomains are fine. It’s your CNAME in the APEX which isn’t supported I’m afraid.
Do you have a link to hubspot of what your trying to do?
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
Hi sip49,
Can you provide even with dummy domain name and subdomain what exactly you want to achivie? Domand and Subdomain and records what do you need in each of them. It will be easier to help.
Thanks,
Sure. Appreciate all the help in advance.
I have 2 hosted zones in Route53:
Now for mail.company.com I want to set it up to enable 2 things: (1) gmail as an alias domain to the root domain, so users can receive emails at <user>@mail.company.com and (2) hubspot domain setup which they use to track links in email and provide HTML versions of emails at the same mail.company.com domain.
For #1, GMAIL provides MX records that must go into the mail.company.com hosted zone. They look like:
For #2, since it's a subdomain, Hubspot provides a CNAME record that must be added. They provide a record that looks like: CNAME mail.company.com <hubspot.com url>
In this case, I can't get a way to get the CNAME above in at either hosted zone. Is that the level of detail you were requesting?