Skip to content

Troubleshooting

Custom domain not working or HTTPS not issued

Custom domain not loading or no HTTPS certificate yet? Check your CNAME with dig or nslookup, fix Cloudflare proxy and root domain issues, step by step.

Updated 3 min read

A custom domain on DployHub works once its DNS points at your app's address. The HTTPS certificate is issued automatically right after that, usually within minutes. If your domain still shows an error, nearly every case comes down to one of the DNS problems below. Work through them in order.

Check what your DNS actually says

Before changing anything, look up the record from your own computer. Replace the names with your own domain:

bash
# macOS / Linux
dig +short CNAME www.example.com
dig +short www.example.com

# Windows
nslookup -type=CNAME www.example.com

You should see your environment's address, for example shop.apps.dployhub.com for live or shop-staging.apps.dployhub.com for staging. If you see nothing, an old IP address or a different hostname, the record is wrong or has not propagated yet.

Record missing or pointing elsewhere

  1. 1

    Open the Domains tab

    Check the domain is added to the right environment, entered as www.example.com with no https:// and no path.

  2. 2

    Edit the record at your DNS provider

    Create a CNAME with name www and value set to the environment's address shown in the Domains tab.

  3. 3

    Remove conflicts

    Delete any A, AAAA or older CNAME record on the same name. Two records for one name confuse resolvers.

  4. 4

    Wait and re-check

    Changes usually show within minutes, but DNS can take up to 48 hours. Re-run dig until it returns the right value.

Cloudflare: turn off the orange cloud

If your DNS is on Cloudflare and the record is proxied (orange cloud), dig returns Cloudflare's addresses instead of ours, and the certificate cannot be issued. Click the cloud icon so it turns grey ("DNS only") and keep it that way until HTTPS works on your domain.

Root domain (example.com) will not take a CNAME

Most DNS providers do not allow a CNAME on the bare root domain. You have two options:

  • Use www.example.com on DployHub and set up a redirect from example.com to www.example.com at your registrar.
  • If your provider supports CNAME flattening or ALIAS records, point the root at your environment's address with one of those.

Other common causes

  • The domain is already attached elsewhere. A domain can belong to only one app and environment; remove it there first.
  • You added the domain to staging but expected it on live, or the other way round. Domains are per environment.
  • Django returns "Bad Request (400)": add your custom domain to ALLOWED_HOSTS, then redeploy.
  • Browser shows an old error: plain HTTP redirects to HTTPS automatically, so test in a private window to avoid cached redirects.
python
# Django settings.py
ALLOWED_HOSTS = ["www.example.com", "shop.apps.dployhub.com"]

Full setup steps are in custom domains. If dig shows the correct CNAME for more than a few hours and HTTPS still fails, raise a ticket with category Domain/HTTPS.

Frequently asked questions

How long does the HTTPS certificate take?

Usually a few minutes after DNS points to your app. DNS changes themselves can take up to 48 hours to spread.

Can I turn the Cloudflare proxy back on later?

Keep the record on DNS only at least until the certificate is issued and your domain loads over HTTPS.

Do I need to renew the certificate?

No. Certificates are issued and renewed automatically as long as DNS keeps pointing at your app.