Preferred URL and redirection testing tool

Use this tool to find preferred URL and redirection of other version of URLs. Poorly managed URLs often have duplicate content issue. Get it right.

Check Your Preferred URL

Note: Just simple clean URL like: example.com

Choose your preferred URL:
http://
http://www.
https://
https://www.

Setting Preferred Domain & Redirection

It's very important to have one preferred URL and other versions of URL should redirect to the primary URL, and this is even more important for home page.

Some people use canonical to set the preferred domain and other versions of URL loads the same content. This method is also fine but looks ugly. Setting up canonical is a lifesaver in certain situations where it's difficult to redirect and a good example is Magento products.

If you will not set it right then it will create duplicate content and it will create major ranking issues.

Example code:

Let's say my preferred URL is: https://www.example.com then other versions of URLs must redirect to preferred URL.

It can be easily managed by adding following code in .htaccess file on an Apache server:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
RewriteCond %{http_host} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://www.example.com/$1 [R=301,L]

Need Help?

If this is too hard or needs help from an expert SEO consultant then talk to us today!