To ensure success of your business, you need to step up and expand your business by reaching out to newer markets. To do this, many businesses go for multiple URL websites to target their audiences located in different regions and countries.
However, creating multiple URLS having the same content may cause your website to be indexed improperly and may also trigger duplicate content issues. This makes it difficult for the search engine spiders to determine which URL version to display in the SERP (Search Engine Results Page).
The best way to prevent your poor SERP ranking is to consider:
- Use ‘301 redirect’ to make sure your website is indexed either on the ‘www’ version or the ‘non-www’ version.
- Build external backlinks to canonical version of the site.
- Make sure all internal links are structured properly.
- Add rel=”canonical” tag to indicate which URLs need to be indexed by the search engines.
Rel=”canonical” tag is the latest practice that has taken search engine optimization to a new
level. Google, followed by other search engines like Bing and Yahoo, began to support the link rel=”canonical” tag to specify a preferred URL version in 2009. Furthermore, in 2011 the support for rel=”canonical” as HTTP Header was announced by Google. This gave webmasters a way to offer a preferred URL for non-text/html content, for example PDF files. This also helped SEO greatly as it helped minimize duplicate content problems.
Get lost in the search results?
Let Promodo experts help your website index better by optimising your pages, improving your content, and enhancing your linking strategy.
By clicking this button you agree to our terms & conditions
However, it has still not been leveraged as it should be by the SEO experts, mainly because they are more focused on traditional methods for URL consolidation and also because HTTP headers are hard to implement.
When to Use Rel=”Canonical”
This is an HTML attribute. This goes in the Header section of the web page to help reduce duplicate content issues by identifying to search engines like Google the master version of the web page. Once it is identified, the correct page is fetched by the search engine and ranked for phrases.
Some of the best places where this tool is helpful for duplicate content issue include:
- Tracking Codes
- Sorting Functionality
- Landing Pages
- Mixed case paths
- Links to non-landing pages
- Appropriate to generate 301 redirects
Mostly, rel=”canonical” tags are non-text HTML content types that add value to your website. These can be crawled, shared and indexed across websites and help build links and pass page rankings.
Here are some of the best and advanced ways to implement rel=”canonical” HTTP headers dynamically.
HTTP Headers Using PHP
It can easily be inserted to HTML content type if it is supported by PHP. This can be done by using the header function and appropriate syntax. By adding or inserting the header () function in front of any HTML, its output will tag on a HTTP header rel=”canonical” link to the actual header before the link is sent. This helps sending the preferred canonical URL as compared to the link tag.
Add HTTP Headers by using .htaccess
You can easily modify HTTP headers for all html/text content types by using .htaccess. This is best for those sites that have less number of files. This saves time as the header is added quickly.
When adding HTTP header by using .htaccess, the filename argument must contain filename, where, and matches any single or a sequence of characters. Also, regular expressions can be added by using ~character.
Advanced HTTP Header Implementation
For advanced HTTP header implementation to create link rel=”canonical”, you need to have in-depth knowledge of .htaccess and also of PHP. First you need to create a PHP file. This is created to control the output of the PDF file. This is mostly done by rephrasing the URL. This enables you to control the PDF document from a PHP file named as “pdf.php”. So when any user tries to open or access a URL that contains “.pdf” file extension, the “pdf.php” file will be first referenced for instructions on how to display the content in the file. This enables you to perform conditional logic and insert canonical HTTP header.
Checking the HTTP Header
Another thing that usually comes to mind when executing these practices is how to ensure whether the HTTP headers created have been sent or not? For such verifications you can use different tools like web developer toolbar or live http headers. You can also try using third party web-based tools for sites that are not hosted locally.
However, it is recommended to test HTTP headers on a local or development website by using .htaccess before you push it live. This will help you detect and rectify potential errors.
Google Vs Bing- Take on the Implementation of Rel=”Canonical” Implementation
Though both search engines support the implementation of rel=”canonical” tags, as compared to Google, Bing has stricter interpretation of it. Also, Bing has less trust on canonicals applied site-wide as compared to Google.
According to Bing quality team, many people use rel=”canonical” command incorrectly, therefore they suggest that people should leave it blank. The team says that a lot of website owners have rel=”canonical” in place as placeholders in their page code which is incorrect. The best thing to do is leave it blank instead of making them point at themselves. This is suggested because pointing rel=”canonical” links at the page on which it is installed indicates that the page is a copy of itself which doesn’t make sense. Therefore if you want your SERP high on the Bing search engine, it’s best to follow the advice given above. This is important because Bing’s overall search share has been growing rapidly and your target audience is probably using it too.
Also, leaving the canonical tags blank will make the project programmatically easier. It will help you manage duplicate content issues and eventually achieve better SERP on both search engines.
Overall, to ensure search engine optimization, SEO experts must try to make the most of the new and advance strategies. This is important to stay competitive and increase visibility of your website on popular search engines.