Adding custom DNS records

If you find yourself in a situation that requires changes to your site, and your developer isn't available to help, DreamHost's skilled support team may be able to assist you for a small fee. You can find more information about supported services and associated costs in the DreamHost Professional Services article.

Overview

You can add custom DNS records for a fully hosted domain as well as a domain set to DNS only. It all depends on what records you are creating and why you need them.

Generally speaking, if you want your site hosted on DreamHost's servers, keep your site as Fully Hosted. However, if you want your site to point away from DreamHost by creating A or CNAME records, the first step is to remove the hosting service already applied to your domain at DreamHost.

The instructions to change the records below will only work if your nameservers are pointed to DreamHost.

You do not need to add the @ symbol when creating custom DNS records. This symbol is added automatically when the Name field is left blank.

Setting your domain to DNS only

View the following article for instructions on how to set your domain to 'DNS Only'.

This is necessary if your site is currently hosted at DreamHost and you want to point your DNS to another hosting company using A or CNAME records.

A record

A records are IP addresses. They can be added to point your website to a different hosting company, or different subdomains of your site to external services.

Pointing a subdomain to a specific IP address

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add A Record
  5. Hover over the A Record section and click the ADD link.
    Add A Record
    • Host: This is either the root domain or a subdomain (blog, store, etc).
      • Root A record: If you want to create an A record for the root domain to point away from DreamHost, you must first set the domain to DNS Only. You can then leave this field blank.
      • Subdomain A record: For a subdomain (blog, dev, shop, etc), enter the subdomain name in this field.
    • Points to: Enter the IP address the subdomain will point to.
  6. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

AAAA record

AAAA records are IPv6 addresses. They can be added to point your website to a different hosting company, or different subdomains of your site to external services.

Pointing a subdomain to a specific IPv6 address

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add AAAA Record
  5. Hover over the AAAA Record section and click the ADD link.
    Add AAAA Record
    • Host: This is either the root domain or a subdomain
      • Root AAAA record: If you want to create an AAAA record for the root domain to point away from DreamHost, you must first set the domain to DNS Only. You can then leave this field blank.
      • Subdomain AAAA record: For a subdomain (blog, dev, shop, etc), enter the subdomain name in this field.
    • Points to: Enter the IPv6 address the subdomain will point to. For example:
      2607:f298:5:104f::765:5be
  6. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

ALIAS record

An ALIAS record is a virtual DNS record similar to a CNAME, but with the ability to add it to the root domain name (which is not possible with a CNAME). It can also be added to a subdomain record that already exists where a CNAME must be unique.

The difference between ALIAS and CNAME records

CNAME records

It's not possible to add a CNAME record to the root domain.

  • example.com

This is because the root domain (example.com) can only use an A record (IP address). The CNAME record is used to point a subdomain such as www.example.com or  calendar.example.com to another service using a hostname (not an IP).

CNAME records can only be added to a subdomain that is not currently using A records.

ALIAS records

It IS possible to add an ALIAS record to the root domain even if there is already an A record assigned to it.

  • example.com

ALIAS records can also be added to a subdomain that is currently in use. For example, if www.example.com or calendar.example.com already have A or CNAME records configured, you can still add an ALIAS record to those same names. In this way, it can coexist with other records on that name.

ALIAS records point to a hostname just like a CNAME record (such as myapp.herokuapp.com). They do not point to an IP address like an A record.

Adding an ALIAS record

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add Alias Record
  5. Hover over the ALIAS Record section and click the ADD link.
    Add Alias Record
    • Host: This is either the root domain or a subdomain (blog, store, etc).
      • Root record: If you want to create an ALIAS record for the root domain, leave this field blank.
      • Subdomain record: For a subdomain (blog, dev, shop, etc), enter the subdomain name in this field.
    • Points to: Enter the hostname location you’d like this record to point to.
  6. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

CNAME record

Along with custom A records, you can point your hosting away from DreamHost with a CNAME record. This record is created to point one domain to another as opposed to pointing one domain to an IP address like the custom A record.

Please keep in mind that a CNAME record can only be created on a subdomain. This means the root record (example.com) cannot be a CNAME record and must always be an A record.

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add A Record
  5. Hover over the CNAME Record section and click the ADD link.
    Add A Record
  6. Enter the following:

    CNAME records cannot start with an underscore.

    • Host: This field can be anything. But very often it’s just www. Adding www points the www subdomain away from DreamHost.
    • Points to: Enter the location you’d like this record to point to.
  7. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

It's possible you may see the following error when adding a CNAME:

You already have a record for this name. You can't have a CNAME and any other record on the same name.

This usually means that you're trying to add a CNAME for www, but since that record already exists in your DNS settings, you're not able to add a second one. If you need to add a CNAME for the www subdomain, you must set your domain to DNS Only first.

If you're attempting to add a CNAME for something else, review your DNS records to see if the record you're adding already exists.

MX record

MX records are DNS records that are necessary for delivering email to your address. If your site is using DreamHost's nameservers and you add MX records, your email will stop being delivered to DreamHost and start being delivered to the new company's mail service.

Only add MX records if you want to host your email at a different company.

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add MX Record
  5. Hover over the MX Record section and click the ADD link.
    Add MX Record
    • Host: This field is usually left blank. Only add something here if your new mail provider requires a host which is often a subdomain, such as www or mail.
    • Points to: Enter the MX record to point to.
    • Priority: Enter the priority number of this MX record. When adding multiple MX records, this value controls which MX record is used first.
  6. Only check the box titled I will still check my email at DreamHost if you are using a Mail Service Provider.
  7. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

TXT record

TXT (Text) records allow you to associate text with a specific host. A common example is adding a Google site verification record, or adding a DMARC email record to your site.

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add A Record
  5. Hover over the TXT Record section and click the ADD link.
    Add A Record
  6. Enter the following:
    • Host: This field can be anything. Very often it’s left blank.
    • TXT Value *: Enter the text value of this record to point to.
  7. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

NAPTR record

Name Authority Pointer (NAPTR) records are most often used for Internet telephony. These records support the use of regular expressions. Here is an example NAPTR record:

$ORIGIN 4.3.2.1.5.5.5.0.0.8.1.e164.arpa.
IN NAPTR 100 10 "U" "E2U+sip" "!^.*$!sip:customer-service@example.com!" .
IN NAPTR 102 10 "U" "E2U+email" "!^.*$!mailto:information@example.com!" .

View the following link for detailed information about this type of record.

Adding

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add NAPTR Record
  5. Hover over the NAPTR Record section and click the ADD link.
    Add NAPTR Record
    • Host: Enter the hostname to enable this record for, or leave blank.
    • Order: A number (from 0 - 65535) that specifies the order in which multiple NAPTR records are processed. Lower values are processed before higher values.
    • Preference:  A number (from 0 - 65535) that specifies the order in which multiple NAPTR records, with equal Order values, are processed. Lower values are processed before higher values.
    • Flags: A lowercase string containing flags to control aspects of the rewriting and interpretation of the fields in the record. At this time only four flags, s, a, u, and p, are defined.
    • Service: Specifies the service(s) available down this rewrite path. It may also specify the particular protocol that is used to talk with a service.
    • Regex: A string containing a substitution expression that is applied to the original string held by the client in order to construct the next domain name to lookup.
    • Replacement:  The next fully qualified domain name to query for NAPTR records depending on the values found in the flags field. This field is only used if the regular expression field is empty. If the Regex field contains a value, this field is not used.
  6. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

SRV record

SRV (service) records are used to identify computers that host a specific service and then establish a connection between that service and the website.

Certain programs and applications may require the set up of these types of records to make those services active. A common example are the following two Microsoft SRV records. More information can be found at the following link:

Type Name Target Protocol Service Priority Weight Port TTL
SRV @ sipdir.online.lync.com _tls _sip 100 1 443 1 hour
SRV @ sipfed.online.lync.com _tcp _sipfederationtls 100 1 5061 1 hour

 

Format

Your standard SRV record is in this type of format:

_service._protocol.name. TTL class SRV priority weight port target.

Adding

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add SRV Record
  5. Hover over the SRV Record section and click the ADD link.

    The example below shows how to add the following record.

    _sipfederationtls._tcp	SRV	100 1 5061 sipfed.online.lync.com.

    Repeat the following steps to add any additional SRV records required.

    Add SRV Record
  6. Enter the following:

    When entering an SRV record in your panel, ignore the TTL, class, and SRV fields.

    • Name: This is most often left blank.
    • Service/Sip: sipfederationtls. Do not add the underscore before this value, or the period at the end.
    • Protocol: tcp. Do not add the underscore before this value.
    • Priority: 100
    • Weight: 1
    • Port: 5061
    • Target: sipfed.online.lync.com
  7. Click the Add Record button.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

CAA records

A Certification Authority Authorization (CAA) record is used to specify which certificate authorities (CA) are allowed to issue a certificate for a specific domain name.

  • If a CAA record is present, only the CAs listed in the CAA record(s) are allowed to issue certificates for the domain.
  • If no CAA record is present, any CA is allowed to issue a certificate for the domain.

These records also give the owner of the domain the ability to set notification rules in case someone requests a certificate from an unauthorized certificate authority. View the following article for further information:

Subdomains

Most often, a CAA record is added to the primary domain name (example.com).

A CAA record added to the primary domain (example.com) also applies to all subdomains such as blog.example.com. However, a CAA record added to any subdomain will take precedence over the CAA record added to the primary domain name allowing you more control over the subdomain record.

Adding a CAA record

  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add CAA Record
  5. Hover over the CAA Record section and click the ADD link.
    Add CAA Record

    Each CAA record created only applies to a single certificate authority. This means you would need to create an additional CAA record for each additional certificate authority that is allowed to issue a certificate for this domain.

    • flag: The value of 1 is used to represent the critical flag. Setting this field to 1 instructs certificate authorities that they must understand the following property tag before issuing a certificate.
    • tag: Choose from the following:
      • Authorization Entry by Domain This sets the issue property. The domain name of a single certificate authority (e.g. sectigo.com) authorized to issue certificates for the domain.
      • Report incident by IODEF report This sets the iodef property. Specifies a URL (https://example.com) or email address (mailto:admin@example.com) a certificate authority may report policy violations. Not all certificate authorities support this tag, so there is no guarantee that all certificate issuances will be reported.
    • value: The value associated with the chosen property tag.
  6. Click the Add Record button to save.

After clicking the Add Record button, the propagation for the new record begins. This can take up to 6 hours before the new record updates online.

Checking the CAA record via SSH

The dig command is often used to query DNS records. Since the CAA record is a new type of record, you must also add type257 when running the command. For example:

[server]$ dig example.com type257

Links

Nameservers

For details on how to set up custom/vanity nameservers, please visit the following article.

Unique IPv4 or IPv6 addresses

You can also add a Unique DreamHost IPv4 or IPv6 record to your domain. View the following articles for further details.

Additional details

  • As with all changes to DNS, these records need time to update online. You may find that it may take a few hours for things to start functioning. You can Flush the DNS to see if this speeds up the propagation process, but there are no guarantees this will help. You can read instructions on flushing the DNS here:
  • DNS changes can take up to 6 hours to resolve. If your nameservers are pointing to DreamHost and the services set up for the record created are not active within this time, you may contact support for assistance at Contact Support.

DreamHost support is able to point you to where you can create custom records as well as check to see if the record is properly applied to your domain. However, support cannot assist with setting up these custom records or whether the record created is correct or not.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?