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:
- Copy all of your DNS records from your current DNS host to the CDN.
- Choose the "proxy" option for the DNS records that point to your website.
- 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.
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.