How To Redirect An Apex LK Domain To A Subdomain

Chanaka Karunarathne
2 min readOct 17, 2021

Recently I purchased a .lk domain from domains.lk. I created a website using sites.google.com and then I linked my domain (let’s say my domain is example.lk) to my web site using following CNAME record.

CNAME Record

There are other things that you have to do before this(ex: verify your domain ownership) but I’m sure you can find those documentations easily.

Then my website URL started working, but only the www.example.lk URL worked and example.lk gave me the 404 error. So I looked for a solution and couldn’t find one. While looking for solutions I learned that www.example.lk is called a subdomain and example.lk is called either an apex domain or a naked domain. I tried different combinations of A (address) records but none of them worked. Mind that LK Domains takes few hours to approve our DNS record changes, so I wasted few days messing around DNS records. I asked their customer support but they weren’t helpful either.

Finally, after trying to understand how DNS works, I found this solution provided by wwwizer.com. So I added following A record into my DNS records.

CNAME and A records

That fixed my issue. So, while waiting for them to approve my change, I decided to write this article in Medium so that someone else’s time will not be wasted due to lack of documentation.

--

--