2

Been researching the site for this but not seeing it and I've ran through:

I have a domain from one company (Foo) and I purchased hosting from another company (Bar). Site is hosted on Netlify but might go to AWS in the future. To add email from the hosting provider I have to add the domain in CPanel.

Given the complexity of everything how can I setup my record to push email to company Bar if nameservers are set at company Foo pointing to Netlify? Do I also add the same servers for company Bar and update the record? How should the record look then?

2
  • "Given the complexity of everything". It is not. Where you bought your domain name is irrelevant. You use this place (called a registrar) just to set up the authoritative nameservers once for all for your domain name. It can be any company, including same one as where you bought the domain name, or not. Then, any changes in records, including creating an MX one, has to be done at the company handling your nameservers, and nowhere else. Also, both companies should be able to help you as you pay them for service. – Patrick Mevzek Mar 8 at 17:52
  • There are a lot of wring assumptions i the post. An MX is a Mail Exchange delivery record and is irrelevant to s3/websites. An MX (or A or other DNS) record is recorded in the nameservers for the domain - not a shared application. (Unless you mischaracterise a nameserver as a shared application) – davidgo Mar 8 at 22:56
1

Without a CDN, your DNS setup would typically look like this:

Usually both your domain registrar and your website host offer DNS hosting services and you can choose whichever you prefer. It sounds like you had been using DNS hosting, website hosting, and email hosting all with the same company (Bar.)

When you add a CDN such as Netlify, the setup would typically look like this:

The CDN usually wants to take over your DNS hosting, so you need to:

  1. Copy all of your DNS records from your current DNS host to the CDN.
  2. Choose the "proxy" option for the DNS records that point to your website.
  3. Go to your domain registrar and point the NS records to the CDN.

The CDN will publicly serve DNS that points to its edge node servers, then the edge node servers will use a back channel to your origin server to get the content.

As far as email goes, only the DNS host changes. The DNS records all stay the same (assuming you copy them correctly). Your email still hosted by the same hosting company.

MX records as shown in my diagram are usually not the only DNS records for email. There are usually some TXT records for DKIM and SPF that enhance email deliverability and fight spam. There may also be some A or CNAME records such as mail.mydomain.example. You should make sure to copy all of the mail DNS records to the CDN DNS server and make sure that the CDN isn't set to proxy any of those records.

After changing your NS records to point to the CDN, the DNS records at your hosting company won't be used. This has the potential to cause confusion later. If you add services to your hosting account, it won't be able to automatically set up the DNS entries for you. You will manually have to add them to the CDN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.