---
title: Point Services to Root Domain
slug: blog.eg.sa
createdAt: 2021-12-20T17:15:56.000Z
---

### Using CNAME Record

Have you ever wanted to use <font color="#8b8b8b">*yourdomain.com*</font> instead of <font color="#8b8b8b">*blog.yourdomain.com*</font> or <font color="#8b8b8b">*status.yourdomain.com*</font>?

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.&#x20;

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.

:::hint{type="info"}
## 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:

![](https://api.archbee.com/api/optimize/UkUF5cczF-upH3Zq0RW4H/T_Ebro259ydeYM5sbbB9F_dnsbetter.png "Cloudflare's DNS Dashboard")

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 [twitter](https://twitter.com/@emad_alghamdi) if you have any questions.




