Subdomain Not Working? How to Fix DNS, Server and SSL Problems
A subdomain needs three things: a DNS record, a server that knows the name, and a certificate that covers it. Test each one separately and the broken link shows itself.
Not loading at all, or a server error like 500, 502 or 503.
Do this first
Diagnose it
The exact wording on the screen tells you which layer broke. Read it before you change anything.
| What the browser shows | What it means | Usual cause |
|---|---|---|
500 Internal Server Error | PHP or the web server crashed building the page. | A PHP fatal error, a bad .htaccess line, or memory exhaustion. |
502 Bad Gateway | The front server got no valid answer from PHP. | PHP-FPM stopped, crashed or has no free workers. |
503 Service Unavailable | The server refused the request on purpose. | Overload, a resource limit, or WordPress maintenance mode. |
504 Gateway Timeout | PHP took longer than the front server would wait. | Slow database queries, a stuck external API call, or a long import. |
508 Resource Limit Is Reached | Your account hit its process or CPU cap. | Traffic spikes or bots on shared hosting with per-account limits. |
403 Forbidden | The server will not serve this request. | A firewall or ModSecurity rule, or wrong file permissions. |
DNS_PROBE_FINISHED_NXDOMAIN | The domain name does not resolve. | An expired domain or wrong nameservers. |
ERR_CONNECTION_REFUSED or ERR_CONNECTION_TIMED_OUT | Nothing answered on the server address. | The server is off, a firewall is blocking you, or DNS points at the wrong IP. |
| Works on your phone’s mobile data but not on your office or home Wi-Fi | The site is up; your network cannot reach it. | The server firewall blocked your IP after failed logins, or your network has a DNS or IPv6 problem. See down only for me. |
Behind Cloudflare, the error page shows a Ray ID and one of these codes:
| Code | What it means |
|---|---|
| 520 | Your server sent back an empty or invalid response, or reset the connection. |
| 521 | Your server refused the connection. The web server is stopped, or a firewall blocks Cloudflare’s IP ranges. |
| 522 | The TCP connection to your server timed out. Usually overload, a firewall silently dropping packets, or the wrong origin IP in DNS. |
| 523 | Cloudflare cannot reach your server at all. The origin IP in DNS is wrong or that network is down. |
| 524 | Cloudflare connected, but your server did not send a response within the proxy read timeout (about 125 seconds by default; Enterprise plans can raise it). |
| 525 | The SSL handshake between Cloudflare and your server failed (SSL mode is Full or Full (strict)). |
| 526 | SSL mode is Full (strict) and your server’s certificate is expired, self-signed or for another name. |
1. Get the status code and timing.
curl -sS -o /dev/null -w '%{http_code} %{time_total}s %{remote_ip}\n' https://example.com/
Run it in your own computer’s terminal (on Windows, type curl.exe). Replace example.com with your domain. -w prints the status code, the time and the IP that answered. Good: 200 in under a second, from your server’s IP. Bad: a 5xx code, or 000, which means no connection at all (DNS or network).
2. See who answered.
curl -sI https://example.com/ | grep -iE '^(HTTP|server|cf-ray)'
Run it on your own computer. -I fetches only the headers. server: cloudflare plus a cf-ray line means the CDN answered, so the problem may be between it and your server. server: nginx, Apache or LiteSpeed means your server answered with that error itself.
3. Check DNS.
dig example.com +noall +comments +answer | grep -E 'status|IN'
Run it on your own computer (Windows: use nslookup example.com). Good: status: NOERROR and an A record with your server’s IP. NXDOMAIN means the name does not exist (expired domain or missing zone). SERVFAIL after a DNS move usually means a DNSSEC DS record at the registrar no longer matches the new DNS provider.
4. Test your server directly, skipping the CDN.
curl -sI --resolve example.com:443:SERVER_IP https://example.com/
Run it on your own computer. SERVER_IP is your server’s IP address from your hosting panel (not the CDN’s IP). --resolve forces curl to connect to that IP while still asking for your domain. If this returns 200 while the normal request fails, the fault is in DNS or the CDN, not your server.
5. Check the domain registration.
whois example.com | grep -iE 'expir|status'
Run it on your own computer. Good: an expiry date in the future and statuses like clientTransferProhibited. Bad: an expiry date in the past, or clientHold or serverHold, which take the domain off the internet.
PHP Fatal error: Uncaught line in the error log timestamped just after an update. Fix: disable the plugin or theme named in the file path, then follow the critical error field guide.server reached pm.max_children setting (5), consider raising it., often with bots hammering wp-login.php or xmlrpc.php in the access log. Fix: block the abusive traffic, make sure page caching works, then ask your host about more workers.clientHold status, or a host page saying the account is suspended. Fix: renew or pay, then open a ticket for the reason. After the grace period, most generic domains enter a 30-day redemption period with a restore fee.No space left on device or Disk quota exceeded in logs, uploads failing, or a database error. Fix: delete old backup archives, huge error_log files and cache folders. Cache files can hit the inode (file count) limit while disk space looks fine.ModSecurity: Access denied with code 403 with a rule id. Fix: send the rule ID and your IP to your host to whitelist or adjust that rule..htaccess edit. Tell: a 500 right after a plugin or a person changed the file, and Invalid command '...', perhaps misspelled or defined by a module not included in the server configuration in the Apache error log. Fix: restore the previous file or the default WordPress rewrite block.Did this fix it?
Still stuck? Start again from what you can see in the Emergency Room.
The full fix
A subdomain needs three things: a DNS record, a server that knows the name, and a certificate that covers it. Test each one separately and the broken link shows itself.
A registrar transfer moves the registration, not your website or mail. Downtime comes from DNS hosted at the old registrar. Secure the zone first, then transfer.
Web records point at the web host and mail records point at the mail provider. Mail breaks when a new host replaces the zone, or its server still thinks it handles your mail.
Your site is buried under traffic. Tell an attack from a viral spike, put Cloudflare in front, challenge or rate limit the hot paths, and lock your origin so it cannot be bypassed.
Your site and email vanished and the domain now points somewhere else, or sits at a registrar you never used. Confirm what changed with RDAP, lock down the email behind the registrar login, then escalate through the registrar, the transfer dispute process and ICANN.
Your designer went quiet, closed their business or will not hand over the domain or hosting. Find out what you already control, prove you are the registrant, recover accounts in your own name, and rebuild access for anything you cannot get back.
The site loads on mobile data but not on your Wi-Fi, or fails only in your office. Prove it is up, then check for a firewall block on your IP, stale DNS, IPv6 and local filters.
A visitor, a service or you got a Cloudflare block page. Search the Ray ID in Security Events, see which rule fired, and narrow it or skip it instead of turning protection off.
Search the field manual
Or jump straight to a symptom
Press / to search from any page, Esc to close