What are Canonical URLs?
Canonical URLs enhance search engine optimization for duplicate content indexed under two URLs or more. Duplicate content will devalue your website thus affecting where you’ll place in search engines.
How to apply canonical URLs for multiple domains
For ease of use when setting up currencies and delivery charges for your shopping cart, you may opt to have two websites one for international shipping and one for shipping within your own country, e.g. a lovingclothes.com and lovingclothes.co.uk. The content will be the same for both.
Search engines get confused when seeing the same duplicate content on multiple websites and will not know which version to rank, index, or how to direct your site link information. Your website will lose traffic and your search engine ranking will ultimately suffer.
Enable one website to be your canonical site. This will be the main website you want search engines – like Google – to rank.
<link rel="canonical" href="https://yourwebsitename.com"/>
How to apply canonical URLs for single pages
If you want to enable canonical links for single pages, you will need to manually add the canonical tag element to the code files in your File Manager. You will add it to the <head> section in your “Header” file.
For example, if you have a single blog post about trends in womenswear on your lovingclothes.com website and have the same blog post in the lovingclothes.co.uk, you can add the canonical link to the <head> section of the lovingclothes.co.uk website:
<link rel="canonical" href="https://yourwebsitename/blog.com/trends-in-womenswear"/>
How to prevent Google from indexing duplicate content on a web page
If your website is still in development, you can add this HTML code to the Header section of the relevant page, to prevent search engines indexing duplicate content on a web page:
<META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW">
This will stop the page from showing in the search engine results. Check that you do not have a robots.txt file attached to the page or this method will not work.