Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

cPanel www not working – How to fix it instantly!

by | Nov 28, 2018

My website is domain.com and it doesn't load up if I place the www. The address with the www gives a "Cannot find server" page message in Firefox and IE.

 

In our role as Technical Support Services for web hosting companies, such website related errors are common issues we resolve for the end customers.

Today, we’ll see what causes the issue of www not working for domains in cPanel servers and how we fix such issues.

 

Causes for cPanel www not working

It is a long-standing practice that domain names are accessed in browsers with the prefix ‘www’, which denotes the World Wide Web.

By default, a site is presumed to load fine when accessed with and without the ‘www’ prefix. But in some cases, this www may not work. Let’s see why.

For a domain to work with www prefix, it should have entry in 2 locations in a cPanel server.

 

1. DNS record – In the DB record for the domain, there should be a ‘CNAME’ entry corresponding to www.

www IN CNAME domain.com.

 

This entry is added by default in the DNS record, whenever a domain is created in the WHM. But in certain scenarios, this ‘www’ entry may get deleted or corrupt, causing domain to not work with ‘www’ prefix.

 

2. Apache configuration file – Another file where the entry for ‘www’ is required, is the web server configuration file usually located at ‘/etc/apache2/conf/httpd.conf’.

The entry for each domain in the config file would be of the format:


ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /home/user/public_html

 

The ‘ServerAlias’ entry in the VirtualHost for www prefix instructs the web server to load the same content as the domain name, when accessed with www also.

This entry is also added by default into the Apache configuration file during domain creation. But cPanel provides option to override the entries in the httpd.conf file.

During Apache configuration corruption or custom setting changes made for Apache, the entries in the config file can get messed up and cause www to not work.

 

Additional causes:

In certain scenarios, some other situations have also seen to cause the www not working issue. These include:

  1. Scenarios where the domain uses external DNS or CDN such as Cloudflare, and the DNS settings are not properly configured there.
  2. Cases where there are URL redirects setup, such as in ‘.htaccess’ files, causing www to redirect incorrectly.

 

 

Fix for cPanel www not working

When www is not working, the first thing we check is the DNS entry. In the DNS zone, we confirm that the entry for ‘www’ is added correctly.

If the issue is confirmed to be with DNS, we edit the DNS Zone and make sure www is set up as a CNAME on the domain.

This can be done from ‘WHM => DNS Functions => Edit DNS Zone’ option.

 

Edit DNS zone to add CNAME

 

 

Strict caution has to be exercised while editing DNS zones, as even a slight mistake such as a missing ‘.’ can corrupt the DNS entry.

As DNS changes involve propagation delay, it can take time for it to reflect world-wide. We test and confirm the changes locally in the DNS servers and verify they are working fine.

dig +trace www.domain.com @localhost

For websites that are hosted in external DNS servers, the updates have to be done in those servers for the site to work fine.

If the DNS is fine, we check and confirm that the entries in Apache configuration file are listed properly. Any missing entries in the conf files are added.

As cPanel automatically reloads Apache configuration files, the changes to the configuration has to be done via the appropriate WHM interface. Manual edits may get lost in updates.

If the configuration file is corrupt, we rebuild it from scratch. Backups are taken before edits and Apache is restarted after the change. Caution has to be taken to avoid incorrect entries that can stop Apache functioning.

If both DNS and Apache entries are proper, we examine further issues such as URL redirects in index files, .htaccess, or other custom configuration files in the site, and fix them.

 

Conclusion

Today we saw how our Support Engineers resolve cPanel www not working issue in our customers’ servers. In our customers’ servers, we monitor all services 24/7 to ensure that all server-wide issues are resolved in no time.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF