Published: 19.03.2021 | Edited: 21.03.2021 | Tags: 100daystooffload
Netlify email forwarding problem
I have created a static page application and hosted in on Netlify. I did it mostly for fun and a learning experience. I was poking around and tinkering it, doing some bugfixing and polishing. The day of the release is coming near and I have started thinking about adding a contact into it for people to reach me.
Netlify does not host it's own email service. It is perfectly alright not to do exactly what a lot of other people are already doing, unless you can improve it significantly. Since email is a delicate interwoven network at best and a tangled mess at worst, I do not blame them in the slightest for not doing so.
For this app I have bought a domain and my current registrar of choice offers a service called mail forwarding. Mail forwarding does basically allow me to set up a one-way email address. One way here means it allows receiving emails (or rather relaying them to the proper mailbox), but does not allow sending from a given address. There are exceptions but for most use cases, this explanation should suffice.
Email forwarding should be enough, because I do not expect a huge traffic there. People that come to see the app and play with it are even less probable to send me a email about their experience.
Up until this point, I though there are no problems in my planned setup. But when I started the preparation for the mail forwarding address, the domain registrar UI made objections, that I have to switch back to their DNS, not the one provided by Netlify.
Now I believe this is a common way to do things (deploy a static page and ad a mail forwarding, until there is a need for something better). There is even a question the Netlify's forum stating that this is a common question. Currently, I do not understand how the user would be able to access the app, when do DNS is pointed at the domain registrar. Hopefully the solution I come with would be the right one, not overcomplicating things needlessly. The second static app deployment would be easier. It is always hardest the first time.
Update: after a little bit of experimenting I have found out that the solution to this problem is thoroughly documented on the netlify docs.
In short, instead of domain using Netlify's DNS directly, registrar's DNS are used instead. Then a specital type of DNS record is used to simulate CNMAE-style domain resolution. This special record is usually labelled as ANAME record, CNAME flattening or from my short experience on the topic, most commonly ALIAS record.
Setting an ALIAS record from the domain I wanted to use to the Netlify's subdomain for the project, for example
email@example.com made it possible for me to use registrar's email forwarding service without aditional cost.
This is a 9th post of #100daystooffload.