A CNAME Record (Canonical Name Record) is a type of DNS record used to map one domain or subdomain to another domain, allowing you to alias your domain to another hostname. Managing CNAME Records involves adding, editing, or deleting entries to configure how your domain redirects or interacts with other services.
Steps to Manage CNAME Records #
Step 1: Log in to Your DNS Management Panel #
- Access the control panel of your domain registrar or DNS hosting provider (e.g., OzSpeed hPanel).
- Navigate to the Domains or DNS Zone Editor section.
Step 2: Locate the CNAME Records #
- Go to the DNS Records or Zone Editor section for the domain you wish to manage.
- Look for existing CNAME Records associated with your domain or subdomains.
Step 3: Add a New CNAME Record #
- Click on Add Record or Create Record.
- Enter the following details:
- Host/Name:
- Specify the subdomain or alias (e.g.,
www
,blog
,shop
).
- Specify the subdomain or alias (e.g.,
- Type: Select CNAME.
- Value/Target:
- Enter the destination hostname (e.g.,
example.com
orservice.provider.com
).
- Enter the destination hostname (e.g.,
- TTL (Time to Live): Set a TTL value (default: 300 seconds or 5 minutes).
- Host/Name:
- Save the changes.
Step 4: Edit an Existing CNAME Record #
- Locate the CNAME Record you want to modify.
- Click Edit next to the record.
- Update the target hostname or other fields as needed.
- Save the changes.
Step 5: Delete a CNAME Record #
- Find the CNAME Record you want to remove.
- Click Delete or Remove next to the record.
- Confirm the deletion.
Examples of Common CNAME Records #
Host/Name | Type | Value/Target | TTL |
---|---|---|---|
www | CNAME | example.com | 300 |
shop | CNAME | shopify.com | 300 |
CNAME | ghs.google.com | 300 |
Use Cases for CNAME Records #
- Alias Subdomains:
- Point
www.example.com
toexample.com
to simplify domain management.
- Point
- External Services:
- Redirect subdomains like
blog.example.com
to external platforms like Medium or WordPress.
- Redirect subdomains like
- Email Verification:
- Use CNAME Records for services requiring domain verification (e.g., Google Workspace, Microsoft 365).
Tips for Managing CNAME Records #
- Avoid Conflicting Records:
- A domain or subdomain with a CNAME Record cannot have other record types (e.g., A Record) for the same host.
- Propagation Time:
- CNAME changes may take up to 24–48 hours to propagate globally.
- Check CNAME Restrictions:
- CNAME Records cannot be set for the root domain (e.g.,
example.com
); use an A Record for the root domain instead.
- CNAME Records cannot be set for the root domain (e.g.,
Troubleshooting Common Issues #
- Domain Not Redirecting:
- Ensure the target hostname in the CNAME Record is correct and resolves to the intended destination.
- Conflicting DNS Records:
- Remove any conflicting A or other record types for the same host.
- Changes Not Visible:
- Clear your local DNS cache:
- Windows:
ipconfig /flushdns
- macOS:
sudo killall -HUP mDNSResponder
- Windows:
- Use a DNS checker like dnschecker.org to verify propagation.
- Clear your local DNS cache:
Additional Notes: #
- Test Your Settings:
- After adding or updating a CNAME Record, test the domain in a browser or with tools like
dig
ornslookup
to ensure it resolves correctly.
- After adding or updating a CNAME Record, test the domain in a browser or with tools like
- Coordinate with Service Providers:
- For external services, follow their specific DNS setup instructions to avoid misconfigurations.