Easily Fix Subdomain Issues on WHM Control Panel – Quick Guide
If a subdomain is not working on a WHM (Web Host Manager) control panel, there are several steps you can take to troubleshoot and resolve the issue. Here’s a comprehensive guide:
1. Check Subdomain Creation in cPanel
First, ensure that the subdomain has been correctly created in the cPanel account associated with the domain.
- Log in to the cPanel account.
- Navigate to the Domains section and click on Subdomains.
- Verify that the subdomain is listed there. If not, create it by filling in the subdomain name and selecting the main domain.
2. Verify DNS Settings
Ensure that the DNS settings for the subdomain are correctly configured.
- Go to the WHM control panel.
- Navigate to DNS Functions > Edit DNS Zone.
- Select the domain that the subdomain belongs to.
- Check if there is an A record for the subdomain pointing to the correct IP address. It should look something like this:
subdomain 14400 IN A 123.456.789.012
If the record is missing, add it manually.
3. Check Apache Configuration
Make sure that Apache is correctly configured to handle the subdomain.
- In WHM, go to Service Configuration > Apache Configuration > Include Editor.
- Check the Pre Main Include and Post VirtualHost Include sections to ensure there are no overriding rules affecting the subdomain.
4. Verify DNS Propagation
DNS changes can take some time to propagate. Use a DNS propagation checker tool (such as https://www.whatsmydns.net/) to verify that the subdomain is resolving correctly worldwide.
5. Check for Redirects or Misconfigurations
Ensure there are no redirects or misconfigurations in the .htaccess file or in the site configuration that might be affecting the subdomain.
- Check the .htaccess file in the document root of the subdomain.
- Look for any redirect rules that might be interfering with the subdomain access.
6. Clear Browser and DNS Cache
Sometimes, the issue might be due to cached data.
- Clear your browser cache.
- Flush the local DNS cache on your computer.
- On Windows, open Command Prompt and run:
sh ipconfig /flushdns
- On macOS, open Terminal and run:
sh sudo killall -HUP mDNSResponder
- On Linux, the command varies by distribution, but often:
sh sudo systemctl restart systemd-resolved
7. Check Firewall Settings
Ensure that firewall settings on the server are not blocking access to the subdomain.
- In WHM, navigate to ConfigServer Security & Firewall (CSF).
- Check the firewall rules to ensure that the IP address and port for the subdomain are not being blocked.
8. Review Logs for Errors
Check the server logs for any errors that might give you more information about the issue.
- Access the error logs from WHM under Server Configuration > Apache Configuration > Global Configuration.
- Look for any relevant error messages that might indicate what’s going wrong.
9. Ensure Web Server is Running
Make sure that the web server (Apache, Nginx, etc.) is running and properly configured.
- Restart the web server from WHM:
- For Apache: Restart Services > HTTP Server (Apache).
- For Nginx or other servers, ensure they are properly configured and running.
10. Contact Hosting Support
If all else fails, contact your hosting provider’s support team for assistance. They can help check server-side configurations and issues that might not be accessible from your end.
By following these steps, you should be able to identify and resolve the issue with the subdomain not working on your WHM control panel.