• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Adding WWW prefix

Biz User

New Pleskian
Hi friends, I ran into few issues when I added www.mysitename.com as the preferred domain name over mysitename.com. It worked fine for a while then the site crashed. SO when we go to Hosting & DNS settings & select the preferred domain name with www prefix, it doesn't work. Does anyone know how to set the preferred domain name with www prefix without causing crashing the website. Value your replies a lot. Thanks in advance.
 
What do you mean by crashing? Is a particular error shown? Are there any errors in the websites logs files?
 
What do you mean by crashing? Is a particular error shown? Are there any errors in the websites logs files?
Yeah 'Hmm... can't reach this page' error. Like when you try a link and the website is removed or wrong url, that error. Is that common or removing the website and installing it again might fix the problem?
 
You'll need to match the configuration of your website's preferred URL with the configuration of your web server's preferred URL, else they will redirect to each other and stop after 10 such redirects, and the site won't be delivered. So probably your website has a non-www URL as the standard URL. This needs to be changed to the same spelling that you use as the preferred URL in the web server.
 
You'll need to match the configuration of your website's preferred URL with the configuration of your web server's preferred URL, else they will redirect to each other and stop after 10 such redirects, and the site won't be delivered. So probably your website has a non-www URL as the standard URL. This needs to be changed to the same spelling that you use as the preferred URL in the web server.
Thank you for replying. Could you please elaborate a little bit on how can I do that? What I did was adding a domain name and installing a wordpress website. After that when I need to change the preferred domain name that issue occurs. Only way I know how to do that is using the hosting option and selecting the preferred domain name with the www prefix. so, what am I doing wrong here? What should be my next steps?
 
In your WordPress backend, go to Settings -> General Settings.
Change the WordPress Address (URL) and Site Address (URL) to the new www-URL.
 
In your WordPress backend, go to Settings -> General Settings.
Change the WordPress Address (URL) and Site Address (URL) to the new www-URL.
WordPress Address (URL) cannot be changed. Site Address (URL) is the only one that can be changed. After I changed it, I couldn't log into wordpress backend.
 
You can check the *_options table of the database of your Wordpress for the "siteurl" and "home" datasets. There you can modify the URL directly. You could for example reset it to the initial value so that you can login again.
 
You can check the *_options table of the database of your Wordpress for the "siteurl" and "home" datasets. There you can modify the URL directly. You could for example reset it to the initial value so that you can login again.
So is it enough to just change those datasets?
 
This solution involves correctly configuring DNS, setting up redirects, updating website settings, and SSL certificate to establish the preferred website address with the "www" prefix while avoiding crashes. If in doubt, consult your hosting provider or a webmaster.
 
Issue fixed guys. Removed the domain from plesk and added it again. Then selected the preferred domain and only after that, copied all the data from staging site. As @dawidmazurkiewicz said, correctly configured DNS settings (like adding mywebsite.com as a CNAME for www.mywebsite.com. because it's www domain name is added as the CNAME by default and selecting the preferred domain name doesn't change these DNS settings). Then it all worked just fine. Thanks all for your support!
 
Back
Top