Omar Gonzales
Omar Gonzales

Reputation: 4008

Heroku's DNS is causing conflicts with Google Suite MX records

Heroku DNS is causing troubles: cannot recieve any email at [email protected] that uses Google Suite as Mailbox.

My host provider is Punto.pe a peruvian company.

My projects is hosted in Heroku, in there I've 2 DNS:

1) www.stickersgallito.pe -> ancient-crab-bwwmzXXXXXXXXXXXX.herokudns.com
2) stickersgallito.pe -> functional-wallaby-XXXXXXXXXXXXXXXX.herokudns.com

enter image description here

I need that people can visit the site entering: www.stickersgallito.pe or just stickersgallito.pe.

So I've entered these 2 records as CNAMEs in my Host Provider Registry Panel.

Problem:

I've also set up other tools like MailGun and Google Suite (to have mailboxes like [email protected]). MailGun functions correctly, I can visit the page either using: www.stickersgallito.pe or stickersgallito.pe.

But I cannot recieve emails at [email protected].

I've consulted my Host Provider and the say that the record for stickersgallito.pe -> functional-wallaby-XXXXXXXXXXXXXXXX.herokudns.com is the problem. It's interfering with other records.

They don't offer any solution, but point to Heroku for a response. Heroku point me to their documentation and if after following it's steps it doesn't work I should talk to my Host Provider.

My host provider says that if I can provide an IP Address from Heroku we could solve this. Heroku's doesn't offer an IP address as far as I know.

Google Documentation to Set Up MX Records:

https://support.google.com/a/answer/140034?hl=en

What can I do?

DNSs in Host Provider:

enter image description here

Registers:

enter image description here

UPDATE 1:

This is the kind of records my Host Provider allows me to enter: A, CNAME, TXT, MX.

enter image description here

When using heroku domains I get:

enter image description here

Upvotes: 0

Views: 343

Answers (1)

Lanexbg
Lanexbg

Reputation: 1132

The CNAME record is forbidden for the root domain exactly for this reason, it doesn't allow any other records you have to work the way you want them to. In the heroku docs they say to use a CNAME like functionality for the root domain, which is ALIAS or ANAME record, but don't use CNAME, your provider should not even allow you to create it.

You can configure heroku to work for a subdomain (e.g. www) and then use a Web Forwarding/Redirecting for the root domain to the www subdomain, if your DNS host doesn't support ALIAS or ANAME record. Contact them for more information.

Here is more info about the root domain configuration: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain

And here is for a subdomain: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-domain-with-a-subdomain

Upvotes: 1

Related Questions