WPCloudDeploy Documentation

Force The Use of WWW On A Website

Sometimes you want to force the use of WWW in front of your domain.  There is generally very little difference on a site using a WWW prefix vs not using it.  There are two reasons though why you might want to force it:

  • “www” stores cookies for the domain and all subdomains.  Without www, separate cookies are stored for each subdomain.  So, for large sites with many requests going between subdomains it might be a tab bit faster when using “www”
  • An existing site already uses “www” and simply wants to continue doing so to preserve SEO rankings & links

To force the use of WWW, just update your WordPress records on the WordPress settings screen.

  • Go to SETTINGSGENERAL
  • Add the ‘www’ in the WordPress Address and Site Address fields.

You can confirm that the change has been made by going to the permalinks screen:

  • Go to SETTINGS Permlinks
  • Each permalink option should show the “www” in it.

Click the SAVE CHANGES button to update your permalinks.

You may need to update your DNS pointers as well to create a WWW entry.

Moving between HTTP and HTTPS

When you switch between HTTP and HTTPS (or vice-versa), we update the domain back to its default.  So, you will need to make the change twice.

First, add the ‘www’ before turning on HTTPS.  This allows us to get a certificate for both ‘www’ and non-www domains.

After HTTPS is turned on, go back and add ‘www’.

Search and Replace

If you’re going from a “mydomain.com” to “www.mydomain.com” then you’ll want to use a WordPress search and replace tool to conduct two search & replaces on your database:

  • Search for “http://mydomain.com” and replace with “http://www.mydomain.com” (or “https://www.mydomain.com” if using ssl)
  • Search for “https://mydomain.com” and replace with “https://www.mydomain.com”

Do NOT search for just “mydomain.com” and replace with “www.mydomain.com”.  If you do you might end up with entries such as “http://www.www.mydomain.com”.

We have a simple search and replace tool in the SITE detail screen.  But for more sophisticated search & replace function we use the search and replace tool in UPDRAFT PLUS (which is our backup plugin).  There are other 3rd party tools that can be used to do this as well.

Other Notes

Don’t forget to set up your CNAME for the “www” prefix in your DNS if it’s not already present!

Share: