It's common for a website to have DNS records for http://pcmltd.eu as well as http://www.pcmltd.eu. Most of the time, the version with www. is the one that is used. If you are not careful, you'll end up with both versions of the website being crawled by Google and other search engines. This could potentially lead to your Search Engine Optimisation (SEO) being diluted, as there are effectively two different websites with the same content.
If you are using Cloudflare for your site, there is a quick way to fix the issue. The following example assumes you wish to redirect http://pcmltd.eu to http://www.pcmltd.eu:
- Login to your account and find the site you wish to change
- Click onto Page Rules
- Click "Create Page Rule"
- Enter your site URL as follows in the first box: siteurl.com/*
- Choose "Forwarding URL" from the dropdown and change "Select Status Code" to "301 - Permanent Redirect"
- In the "Destination URL" box, enter the following: http://www.siteurl.com/$1
- Press "Save and Deploy"
Now, when a user tries to access a page such as http://siteurl.com/about-us, then will automatically 301 redirected to http://www.siteurl.com/about-us with a 301 redirect.
If you are using Drupal as your CMS of choice, there are rules in the .htaccess file allowing you to redirect all traffic to your preferred version of the URL. However, when you update the core of Drupal, these rules can be overwritten. By doing it this way, you avoid overwriting your .htaccess when updates are applied.
If you are not using Apache but not Cloudflare, the same can be achieved by putting some Redirect rules in your virtualhost config file.