CNAME URL Redirect: How to Point Your Domain to Another Website

Author

Reads 1.2K

OpenAI Website with Introduction to ChatGPT on Computer Monitor
Credit: pexels.com, OpenAI Website with Introduction to ChatGPT on Computer Monitor

A CNAME URL redirect is a way to point your domain to another website, essentially making it seem like your domain is the original website. This is useful for companies with multiple brands or websites that need to be managed separately.

To set up a CNAME URL redirect, you'll need to create a record in your domain's DNS settings. This record will point to the IP address of the website you want to redirect to. You can do this in your domain registrar's control panel.

The CNAME record will have two main parts: the name and the value. The name is the part that you'll enter in your domain registrar's control panel, and the value is the IP address of the website you're redirecting to.

Additional reading: Domain Url Forwarding

What Is It Used For?

A CNAME record is used to map an alias name to a true or canonical domain name. This is particularly useful in creating custom shortened URLs, where a short domain like media.company.com is mapped to the domain of the URL shortening service, like share.postbeyond.com.

Credit: youtube.com, What are CNAME records? (and how they compare to DNS A records)

In the process of creating a custom shortened URL, a 301 redirect is necessary to ensure seamless redirection from the custom domain to the actual content location. This is achieved by mapping the custom domain to the URL shortening service.

You can use a CNAME record to move traffic from one domain to another, such as from www.yourdomain.com to yourdomain.com. However, if a user has anything added to the URL path, it will not be carried over.

CNAME records are not the same as redirects; they are actually aliases that map a hostname to another hostname within the same FQDN. This means that if you use a CNAME record to redirect traffic, the path will not be preserved.

Related reading: Custom Domain Name Azure

Setting Up DNS Records

To set up DNS records for your CNAME URL redirect, you'll need to log in to your NS1 account and click "DNS" in the top menu. Within the zone name search bar, type your root domain, such as example.com.

For another approach, see: Dns Domain Namespace

Credit: youtube.com, What is DNS? Setup for my domain? MX, CNAME, A Records Explained

You'll then see a list of records associated with your domain, including the host record value. If a record already exists for the host record value from your EasyRedir, you'll need to modify or delete it to avoid conflicts.

To modify an existing CNAME record, click on the existing record to edit it, or click the purple "Add Record" button to create a new one. Once you've added your values, click the purple "Save Record" button.

DNS Record

A CNAME record is a type of DNS record that allows you to point a subdomain to a different server.

You can create a CNAME record for subdomains like www.example.com or blog.example.com, but not for the top-level domain itself, like example.com.

Creating a CNAME record will automatically update if the target server's IP address changes, so you don't have to worry about updating the record manually.

This is especially useful if you're using a third-party service that's responsible for hosting your subdomain's content.

Credit: youtube.com, CNAME Record DNS Setup for Beginners

Redirecting your website with a CNAME record won't affect your email, since email is sent to the top-level domain, not the subdomain.

However, keep in mind that creating a CNAME record will override any automatic handling of subdomains by your DNS provider.

Updating a CNAME record requires some planning to avoid downtime, so it's essential to change the TTL to 60 seconds before making any changes.

This will allow you to make changes quickly and easily, and the DNS servers will update every 60 seconds.

It's also a good idea to wait 24-48 hours for the DNS records to propagate through the network before making any changes.

If you're updating existing CNAME records, it's best to update the TTL first, and then make the changes to the record settings.

This will ensure that you can make changes quickly and easily, and the DNS servers will update accordingly.

Related reading: Email Addresses Domain

DNS A Record

An A record allows you to directly specify the IP address for your website (domain name).

Credit: youtube.com, How to Point a Domain Name to an IP Address (DNS A record example)

You can specify that example.com should resolve to 192.0.2.3.

Using an A record is discouraged because it becomes useless if the IP address of the target server changes.

You should instead use a CNAME record wherever possible, since the target of a CNAME record is another name (not an IP address) which can usually resolve correctly.

Creating a New Record in NS1

To create a new record in NS1, you'll need to locate your domain name by searching in the zone menu. This will show your domain listed under "zones", and you'll want to click the purple "records" link to be brought to your existing DNS records.

You'll then click the purple "Add Record" button to create a new CNAME record. If you'll be creating a new CNAME record for your redirect, you'll need to retrieve the DNS set-up information from your EasyRedir configuration and import that data into this DNS record.

YouTube Website on Laptop Screen
Credit: pexels.com, YouTube Website on Laptop Screen

Copy the values from the Hostname setup information over to your "Add Record" in NS1. You'll need to be within the registered domain name in NS1, which you should already be.

For the "answers" field in NS1, put the information from the "Recommended DNS Values" in EasyRedir. Keep the TTL at 60 for now, you can update to longer once you can confirm it's working.

Reconfiguring DNS Records

Reconfiguring DNS records is a crucial step in setting up a CNAME URL redirect. To do this, you'll need to log in to your NS1 account and click on the "DNS" tab in the top menu.

You'll then need to search for your root domain within the zone name search bar. For example, if your redirect source URL was resources.example.com, you would search for example.com. This will show you the domain and all records associated with it.

Click on the purple records link to view your existing DNS records. If you're creating a new CNAME record, you'll need to locate your domain name by searching in the zone menu. This will show your domain listed under "zones", where you can click the purple "records" link to view your existing DNS records.

Credit: youtube.com, Create Alias CNAME record in Windows DNS

To edit an existing CNAME record, click on the existing CNAME record to edit it. If a CNAME record doesn't currently exist, click the purple plus icon to create a new one. You'll then need to copy the values from the Hostname setup information from your EasyRedir configuration into the new record.

For the "answers" field in NS1, put the information from the "Recommended DNS Values" in EasyRedir. Keep the TTL at 60 for now, and you can update it later once you've confirmed it's working.

See what others are reading: Cname Cloaking

Understanding DNS Concepts

DNS records are a crucial part of online presence. A CNAME record is a type of DNS record that allows you to point a subdomain to a different server.

You can only create a CNAME record for subdomains, such as www.example.com or blog.example.com. Creating a CNAME record for the top-level domain (example.com) requires an A record.

A CNAME record essentially creates an alias for another domain, making it easy to manage multiple services from a single IP address. This is particularly useful for small businesses with multiple services running on the same server.

Credit: youtube.com, Understanding CNAME Records in DNS Systems

Redirecting your website with a CNAME record won't affect your email, since email is sent to addresses at the top level of your domain name, not to subdomains.

A CNAME record can be used to point to a CDN, such as customer-1234.example-CDN-company.net, giving the CDN company control over DNS while hiding the complexity from end-users.

Using DNS CNAME Record

A CNAME record is a type of DNS record that maps an alias name to a true or canonical domain name.

It's used to map a short domain like media.company.com to the domain of the URL shortening service, like share.postbeyond.com.

A CNAME record is not the same as a redirect, but rather an alias that maps a hostname to another hostname within the same FQDN.

You can use a CNAME record to move traffic from www.yourdomain.com to yourdomain.com, but the path will not be carried over.

A CNAME record is essentially an alias for another domain, and it can point to a different domain, not just within the same domain.

If this caught your attention, see: Godaddy Domain Forwarding Not Working with Https

Credit: youtube.com, CNAME Records Explained

For example, if you have one server behind IP 203.0.113.30 that runs different services under your domain "example.com", you can create CNAME records for everything else like www, ftp, mail, and point them to example.com.

This makes it easy to move services later to another server without having to make changes in mail clients all over the place.

A CNAME record also masks the underlying domain, making it easy to use a CDN without revealing the IP address to the end-user.

You can also use a CNAME record to add a second domain name as an alias to the other site, making it seem like both domain names point to the same website files.

Both domain names will share the same email, and any mail sent to one mailbox will appear in the other mailbox.

Frequently Asked Questions

Does CNAME change URL in browser?

No, a CNAME record does not change the URL in the browser, but rather directs the client to the same IP address as the root domain. The actual URL handling is still managed by the web server.

Danny Orlandini

Writer

Danny Orlandini is a passionate writer, known for his engaging and thought-provoking blog posts. He has been writing for several years and has developed a unique voice that resonates with readers from all walks of life. Danny's love for words and storytelling is evident in every piece he creates.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.