What is CName record

A CNAME record is like a forwarding address for websites. Imagine you have a website at example.com, and you also want people to reach the same website by typing www.example.com. Instead of creating a separate setup for www.example.com, you use a CNAME record to tell the internet, “If someone asks for www.example.com, just send them to example.com.”
Table of Contents
How It Works
- Creating the Shortcut:
- You set up a CNAME record to create an alias or shortcut. In this case,
www.example.combecomes an alias forexample.com.
- You set up a CNAME record to create an alias or shortcut. In this case,
- When Someone Visits the Alias:
- When someone types
www.example.cominto their browser, the CNAME record automatically redirects them toexample.com.
- When someone types
- Resolving the Final Destination:
- The internet then looks up
example.comto find the actual location (IP address) of your website and takes the visitor there.
- The internet then looks up
Simple Example
- If you own
example.comand want people to also find your site usingshop.example.com, you can create a CNAME record forshop.example.comthat points toexample.com. Now, anyone who typesshop.example.comwill end up atexample.com.
Key Takeaways
- Alias: A CNAME record is like a nickname for your domain.
- Redirection: It automatically redirects one domain name to another.
- Efficiency: It’s useful for managing multiple domains that lead to the same place.
This makes it easier to manage your website and ensures that all the different ways people might type your website address lead them to the right place.
