1. Home
  2. Domains & DNS
  3. How do I create or edit a DNS record for my domain?

How do I create or edit a DNS record for my domain?

Den här artikeln finns även på svSvenska

To add or edit a DNS record you first need to login to your cPanel account. When you have done that click on Zone Editor in the Domains section.

Zone editor icon in cPanel

All the domains associated with your web hosting account will now be displayed in a list. Find the domain name you want to make changes to and click on Manage.

Link for managing a domain name

If you cannot find the domain name you want to mange you have either logged in to the wrong account or you haven’t added the domain name to your account.

Already existing records

Before you add a new DNS record make sure that the record doesn’t already exist. If it exist edit it instead.

For instance, if you are going to point your website to another server there should be an A record for that domain name and an A or CNAME record for www.yourdomain.com. Instead of creating two new records that points to the new server you should edit the already existing ones.

To edit an already existing record you need to click on Edit to the right of the record.

Edit a record

We are not going to explain the options you see now in any more detail in this section since it is exactly the same options as when you create a new record. Instead you should refer to the relevant section below for a more detailed explanation on what each option do.

Add a new record

To add a new DNS record you have to click on Add Record.

Add new zone records

A

If you are going to create a new DNS record which is pointing to an IP address (IPv4) you need to use the A record type:

create or mange an A record

  • Name: The domain name you want to create a record for. In this case example.com but it can also be a sub domain for example test.example.com.
  • TTL: You can use 7200 here if you don’t know you need something else.
  • Type: A
  • Record: The IP address you want your domain to point to.

CNAME

With a CNAME you can point one domain to another domain. For instance if you have created an A record for example.com which points to the IP address 123.123.123.123 you can create a CNAME for exampel.se which points to example.com.

In that case example.se will use the same IP address as example.com (123.123.123.123). If you in the future change the A record for example.com to another IP address, for example 321.321.321.321, then example.se will automatically start to point to the new IP address as well.

When you create a new CNAME you have to fill out this information:

Create or manage a CNAME record

  • Name: The domain name you want to create a record for. In this case example.se but it can also be a sub domain for example test.example.se.
  • TTL: You can use 7200 here if you don’t know you need something else.
  • Type: CNAME
  • Record: The domain name you want to point your CNAME to, in this case we use example.com but it can also be a sub domain.

CNAME and redirect are two different things. A redirect forwards a visitor from one domain name to another. A CNAME record only says that one domain name is using the same IP address as another domain name.

TXT

A TXT record is a type of DNS record that associates a string of text with a domain name. In theory you could use whatever text you want but there are some specifications for how the text should be formatted. For instance SPF and DKIM uses a very specific format for their TXT records.

To create a new TXT record you have to fill out the following:

Create or manage a TXT record

  • Name: The domain name you want to create a record for. In this case example.se but it can also be a sub domain for example test.example.se.
  • TTL: You can use 7200 here if you don’t know you need something else.
  • Type: TXT
  • Record: What you should enter into this field is depending on what kind of TXT record you are going to create. The most common situation is that you have been instructed by someone to create a new TXT record. For instance if you are going to create a TXT record for G Suite you have received a text string from Google that you need to enter. If you don’t know what you should enter into this field you need to contact the person/company that have requested you to add the TXT record so that they can give you that information.

MX

The MX record defines where email for your domain name is handled. For instance the domain name example.com uses mail.example.com as its MX record. The sub domain mail.example.com is an A record that points to the IP address 123.123.123.123. Emails for example.com will therefore be sent to the server with the IP address 123.123.123.123.

It is not allowed to point a MX record towards an IP address, you must use a domain name. That is why it is very common to create the sub domain mail, for example mail.example.com.

Create or mange an mx record

  • Name: The domain you want to create the record for, in this case example.com.
  • TTL: You can use 7200 here if you don’t know you need something else.
  • Type: MX
  • Priority: You can have more than one MX record for a domain name. If you want you can give each MX record a different priority. Email will be delivered to the MX record with the highest priority first and if that server isn’t responding it will try a server with a lower priority instead. Just remember that a lower number indicates a higher priority, for example, 0 is a higher priority than 1. You can also use the same priority for all of your MX records to balance the traffic between several servers.
  • Destination: This is the server where email for your domain name will be sent, for instance mail.example.com. You cannot use an IP address here.

Was this article helpful?

Related Articles