Point Services to Root Domain
2 min
using cname record have you ever wanted to use yourdomain com yourdomain com instead of blog yourdomain com blog yourdomain com or status yourdomain com status yourdomain com ? you've probably wanted to use your main domain for web applications or services which only support subdomains and cname records the problem with cname is that they cannot be placed at the root domain level because the root domain is the dns start of authority (soa) which must point to an ip address that's true, but there's an easy workaround which i'll explain below in order for you to use your root domain with any web app or service, they need to provide you with the option of pointing your dns a record to their ip address in most cases, cname is provided for the ease of its implementation and manageability in this example, i will be using better uptime which is an uptime monitoring service commonly, it is best to use the subdomain additionally, they only allow having a subdomain for their service, in this case, a status page so normally i will create a new subdomain for a status page such as status eg sa but for the purpose of this demonstration, i will force it to use my root domain eg sa use case a common use case is using it with most blog services blog yourdomain com > yourdomain com implementation the solution is to use cloudflare for your dns management it allows you to override this restriction enabling you to point your root domain to any service address as seen below in the cloudflare dns screen, type in your root domain and the cname value that was provided by your web app, respectively for ssl , make sure you set the proxy status to dns only depending on the web app configuration now, instead of accessing status eg sa, my main domain became the status page feel free to reach me on https //twitter com/@emad alghamdi if you have any questions