After you purchase a Bluehost VPS, virtual dedicated server (VDS), or dedicated server with cPanel, set up your server so other mail providers can verify who is sending your email. Without this setup, your messages are more likely to be rejected or filtered as spam.
In October 2026, Spamhaus published its Sender Guidelines and announced that it is gradually enforcing basic DNS requirements, starting in November 2026. Every sending IP address needs a valid HELO, a PTR record, and a matching A record. An IP address that misses these requirements can be listed on a Spamhaus blocklist, and mail providers that use Spamhaus data may then reject its email.
This article walks you through the setup on a cPanel server, including AlmaLinux 9 with cPanel. Shared hosting plans already meet these requirements, so you don’t need these steps on a Shared plan.
Before you begin
Make sure you have:
- Root access to WebHost Manager (WHM) on your server.
- A domain name you control, to use for the server hostname.
- Private nameservers set up for that domain. This article’s recommendations require them, because the default Bluehost nameservers (ns1.bluehost.com and ns2.bluehost.com) don’t work with VPS, VDS, or dedicated servers. See How to set up private nameservers for a VPS or dedicated server. You can also set up your records manually with another DNS provider, but those steps aren’t covered in this article.
- The server’s main IP address.
Step 1: Set the server hostname
Your hostname identifies your server on the internet and appears in your mail headers. If your server doesn’t have a hostname yet, or it uses a placeholder or a default name, set one now.
Choose a valid hostname
Follow these cPanel rules for the hostname:
- Use a fully qualified domain name (FQDN) that uniquely identifies the server, such as
server.example.com. - Use 60 characters or fewer, and only lowercase Latin-script letters.
- Don’t start the hostname with
wwwor a number, and don’t end it with a hyphen. - Don’t use a domain that a cPanel account on your server uses, or a service name such as
cpanel.example.comorwhm.example.com. - Don’t use
localhost, a placeholder, or a generic hosting-provider hostname. Spamhaus doesn’t accept these.
Set the hostname in your Bluehost account
The easiest way to set your hostname is from your Bluehost account.
- Log in to your Bluehost account.
- Go to Hosting » My Plans.
- Find your VPS, VDS, or dedicated server plan, and then click View Details.
- In the Hostname card, click Click to set hostname.
- Follow the prompts to enter and save your hostname.
Setting the hostname this way also sets your server’s PTR (reverse DNS) record and its mail HELO, so you can skip Step 2 and Step 3. DNS changes can take up to 48 hours to propagate.
Alternative: Change the hostname in WHM
You can also change the hostname in WHM. If you do, Bluehost doesn’t set the PTR record for you, so you also need to complete Step 2.
- Log in to WHM as root.
- Go to Home » Networking Setup » Change Hostname.
- Enter the new FQDN in the New Hostname text box, and then click Change.
- When the change finishes, scroll to the bottom of the page and click Add An A Entry for your hostname.
- Review the server information. If it’s correct, click Add Entry.
WHM changes the hostname immediately and restarts the services that need it. Access to the Calendars and Contacts interface is blocked briefly while the change runs.
For more detail, see cPanel’s Change Hostname documentation.
Point the hostname to your server
The hostname must resolve to your server’s main IP address. If your domain’s DNS is managed somewhere other than this server, create the A record at your DNS provider instead.
Step 2: Request the PTR (reverse DNS) record
If you set your hostname in your Bluehost account in Step 1, Bluehost sets the PTR record for you. Skip the request below and go to the verification commands. Complete the request only if you changed the hostname in WHM.
A PTR record maps your server’s IP address back to a hostname. Mail providers check it to confirm your server is a legitimate sender. The PTR record must match the hostname you set in Step 1, and that hostname’s A record must resolve back to the same IP address.
If you changed the hostname in WHM, you can’t set the PTR record yourself. Contact Bluehost Support and include:
- Your server’s IP address.
- The hostname you set in Step 1.
- Your product type (VPS, VDS, or dedicated server).
After the PTR record is set, verify both records. Replace the example values with your own:
# Expected result: server.example.com.
dig A server.example.com +short
# Expected result: 203.0.113.25
The PTR lookup should return your hostname, and the A record lookup should return your server’s IP address. If either result is different or empty, don’t send mail yet. Contact Support.
Step 3: Configure your HELO hostname
Most servers can skip this step, because the server announces its hostname as the HELO by default. You only need it if you send mail from more than one IP address and want each address to announce its own hostname. If you set your hostname in your Bluehost account, the mail HELO is already set for you.
When your server connects to another mail server, it announces itself with a HELO (or EHLO) hostname. Spamhaus requires that this hostname resolves to the IP address your server sends from, and that it stays the same from one connection to the next. Matching it to your PTR hostname is the simplest way to meet the requirements. On a cPanel server, you set the HELO hostname in WHM and in the /etc/mailhelo file.
Turn on custom HELO in WHM
- Log in to WHM as root.
- Go to Home » Exim » Configuration Manager, and then click the Domains and IPs tab.
- Set Use the reverse DNS entry for the mail HELO/EHLO if available to Off.
- Set Reference /etc/mailhelo for custom outgoing SMTP HELO to On.
- Click Save.
Edit the /etc/mailhelo file
- Access the server’s command line as root, using SSH or the Terminal in WHM.
- Open the
/etc/mailhelofile in your preferred text editor. - Add your entries to the file, using this format:
domain.tld: mail.domain.tld
*: hostname.domain.tldNote: Most people only need the*: hostname.domain.tldline, which sets one HELO hostname for every domain on the server. Add a domain-specific line only if you need a different HELO hostname for a particular email domain.Replace the example values as follows:
hostname.domain.tldis your server’s hostname from Step 1. The*line applies to every domain that doesn’t have its own line.domain.tldis an email domain on your server, andmail.domain.tldis the HELO hostname the server uses when it sends mail for that domain. This line is optional.
Every HELO hostname you add must have an A record that resolves to your server’s IP address. Use the server hostname from Step 1 for the * line so the HELO matches your PTR record.
- Save the changes and exit the text editor.
- Restart Exim:
/scripts/restartsrv_exim
Check the HELO hostname
Use the HELO/DNS checker on the Spamhaus Sender Guidelines page. Confirm the HELO hostname matches the PTR record from Step 2.
For more detail, see cPanel’s How to configure mailhelo for Exim article.
If you change the server hostname later, check your PTR and HELO settings again using Step 5.
Step 4: Set up SPF and DKIM
SPF lists the servers allowed to send mail for your domain. DKIM adds a digital signature to your messages. Mail providers use both to check that your mail is authentic.
cPanel creates SPF and DKIM records automatically for every new account. It doesn’t create them for accounts that already exist on the server. To add them for existing accounts:
- Log in to WHM as root.
- Go to Home » DNS Functions » Enable DKIM/SPF Globally.
- Click Proceed.
The server creates the records as a background task. Don’t edit any nameserver configuration files while it runs. If a domain already has an SPF record, cPanel adds the server’s IP address to it. Existing DKIM records aren’t changed.
To check or manage the records for a single domain, log in to cPanel and go to Home » Email » Email Deliverability. Accounts that use a temporary domain (a cpanel.site subdomain) don’t support DNS editing or email services.
For more detail, see cPanel’s Enable DKIM/SPF Globally documentation.
To confirm the records are published, replace example.com with your domain:
# Look for a record that starts with v=spf1 and includes your server’s IP address
Step 5: Verify your setup
Before your server sends mail, and again after any hostname change, check each item:
- The PTR record exists and returns your server’s FQDN.
- That hostname’s A record returns the same IP address.
- The PTR record isn’t a generic provider default.
- The HELO hostname resolves to your sending IP address and stays consistent.
- SPF and DKIM records are published for each sending domain.
- Your IP address isn’t listed on a Spamhaus blocklist.
Use the HELO/DNS checker on the Spamhaus Sender Guidelines page to test your HELO and DNS setup, and the Spamhaus Reputation Checker to see whether your IP address or domain is listed. Results from the HELO/DNS checker aren’t available for every IP address and may lag recent changes.
Optional: Build a DMARC record
DMARC works with SPF and DKIM. It tells receiving mail servers how to handle messages that don’t match your domain’s SPF and DKIM settings. A DMARC record is optional. It isn’t required to complete the setup in this article, and Spamhaus doesn’t currently require it for delivery. However, Gmail, Yahoo, and Microsoft require DMARC from senders who send 5,000 or more messages per day to their users. Requirements can change in the future, so you may want to publish one. Use this section to build it.
Record format
A DMARC record is a TXT record with this format:
Set each field as follows:
- Hostname: Must begin with
_dmarc, even when the record is for a subdomain. For example,_dmarc.domain.tld.or_dmarc.subdomain.domain.tld. - TTL: The record’s time-to-live. Use a value between 1800 and 3600 seconds.
- Class: Always
IN. Many DNS editors, including cPanel’s, leave this field out of the interface and add it to the finished record automatically. - Record type: Always
TXT. - Record text: A set of tags, described below. Only the
vandptags are required.
Record tags
vis the protocol version. It is currentlyv=DMARC1;pis the policy for messages that fail the DMARC check. Usenone(take no action),quarantine(treat the message as suspicious), orreject(refuse the message). For example,p=quarantine;pctis the percentage of failing messages the policy applies to. Set it to100once you finish testing the record. For example,pct=100;aspfsets the SPF alignment check to relaxed (r) or strict (s). For example,aspf=r;adkimsets the DKIM alignment check to relaxed (r) or strict (s). For example,adkim=r
Assemble and publish the record
After you choose a value for each field, assemble the finished record. This example uses the values above:
Keep these points in mind when you publish the record:
- A DMARC record applies to all subdomains of the domain unless a subdomain has its own DMARC record.
- Publish the record on the domain’s authoritative nameservers. If your DNS is hosted elsewhere, such as at Cloudflare, add the record there.
- Like other DNS changes, a new record can take up to 48 hours to propagate.
To confirm the record is published, replace example.com with your domain:
# Look for a record that starts with v=DMARC1
For more detail, see cPanel’s How to build a DMARC record article.
Frequently asked questions
How long do DNS changes take to take effect?
DNS changes can take up to 48 hours to propagate. This applies to the hostname A record, the PTR record Support sets, and any SPF or DKIM records you add. Wait for this period before you decide something is wrong, and run the checks in Step 5 again once it has passed.
My domain’s DNS isn’t hosted on my server. Does that change the setup?
Yes. This article assumes your domain uses private nameservers that point to your server. WHM adds records only to the DNS zone on your server, and those records take effect only if your server’s nameservers are the ones your domain uses. If your domain uses your registrar’s nameservers, or any other DNS provider, you can still set this up by creating the records there manually. We don’t cover the steps for each provider, so please consult your provider on how to add the needed records. Create these records:
- The A record for your server hostname, pointing to your server’s main IP address.
- The SPF and DKIM records for each sending domain. The Email Deliverability page in cPanel shows the records each domain needs.
Records you add at another DNS provider are also subject to the 48-hour propagation period.
I use Cloudflare for my domain’s DNS. What do I need to do?
Cloudflare hosts your DNS zone, so the A record WHM adds on your server has no effect. Create these records in your Cloudflare dashboard instead:
- An A record for your server hostname, pointing to your server’s main IP address.
- The SPF and DKIM records for each sending domain.
Set the hostname A record to DNS only (gray cloud). If the record is proxied (orange cloud), it resolves to a Cloudflare IP address instead of your server’s, so it won’t match your PTR record.
My PTR record doesn’t match my hostname. What should I do?
First, confirm that your hostname’s A record resolves to your server’s IP address, using the commands in Step 2. If the A record is correct and the PTR record is still wrong after 48 hours, contact Bluehost Support and include your server’s IP address and hostname.
I changed my server hostname. What do I need to redo?
If you change the hostname in your Bluehost account, repeat Step 1. Bluehost also updates the PTR record and mail HELO. If you change it in WHM, ask Support to update the PTR record (Step 2), and update any custom HELO entries in /etc/mailhelo (Step 3). Then run the checks in Step 5 again.
The Spamhaus checker doesn’t show results for my IP address. Is something wrong?
Not necessarily. Spamhaus notes that results aren’t available for every IP address, and they can lag recent changes. Check your records with the dig commands in Step 2 instead.
My IP address is listed on a Spamhaus blocklist. What should I do?
Find and fix the cause of the listing. Spamhaus doesn’t reset reputation on request. If you need help working out the cause, contact Bluehost Support.
Next steps
Server setup is only part of good email delivery. These topics help you keep your mail out of spam folders:
- Send only to subscribers who confirmed they want your mail, and include an unsubscribe link in every message. See Email Marketing Basics and the Bluehost Anti-Spam Policy.
- Increase your sending volume gradually on a new server.
- If your IP address is listed, find and fix the cause. Spamhaus doesn’t reset reputation on request. See Email Blacklist: How to Check for Blacklisting and Get Yourself Removed.
Summary
To send email from your cPanel VPS, VDS, or dedicated server, make sure the server meets Spamhaus requirements:
- Set a valid FQDN hostname in your Bluehost account. This also sets the PTR record and the mail HELO.
- If you set the hostname in WHM instead, ask Bluehost Support to set a matching PTR record.
- Check that the HELO hostname matches the PTR record and resolves to your server’s IP address.
- Make sure SPF and DKIM records exist for every domain.
- Verify everything again after any hostname change.