6 replies
  • SEO
  • |
How Can i resolve canonicalization issue ?and what is .htacess file?
#onpage #seo
  • Profile picture of the author kishoreseo
    .htaccess is nothing but hypertext access. It is a config file used by apache servers to maintain or control the directories and sub-directories in root folder.

    This .htaccess file is used for redirects in seo front. Need to write re-direct (301 or 302...etc) code in it and save to root folder, then it controls the process of request made.

    Canonicalization: Multiple pages having Similar/Same content with different url's,

    Example:
    http://www.example.com/
    http://www.example.com/index.html
    http:/example.com/
    http://example.com/index.html

    All the above four url's leads to the same single home page, but in google point of view all the above four URL's are different and the popularity of the pages gets split up.
    So to avoid duplicate issues, we need to use canonical tags

    Choose one final URL and add canonical tag in head section of index file
    <link href="http://www.example.com" rel="canonical" />

    So the canonical tag passes the same amount of linkjuice from all pages to selected page, as 301 redirect does and also it will take less time to implement.
    {{ DiscussionBoard.errors[9698065].message }}
  • Profile picture of the author Brown2
    Canonical issue can be resolved through permanent 301 redirect. There are different ways for fixing this issue. You can resolve it using canonical tag or you can also resolve it by implementing .htacess file. .htacess file is a configuration file which is supported by various web servers. This file is mainly used for security restrictions.

    You can add the below code on .htacess file. save it and upload it to your server. This process can also redirect your website from non-www to www version.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
    {{ DiscussionBoard.errors[9700257].message }}
  • Canonicalization issue can be resolved by implementing permanent redirection on the website. It depends upon which URL you is your preferred URL and from which URL you want to implement redirection.

    For example: If your website is opening on both the versions like http://www.abc.com and http://abc.com. So, Google will treat both the versions as different websites and it can create duplicacy issue. To avoid this issue it is important to implement redirection from http://abc.com to http://www.abc.com.

    .htacess file is place where you need to implement the code of the redirection. This file will be available in the root directory of the website.

    For your reference please find the Code which you need to implement in the .htacess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^abc.com$ [NC]
    RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301]
    {{ DiscussionBoard.errors[9700298].message }}
  • Profile picture of the author Swaran Jit
    when your website open with www and wihout www it's called Canonicalization issue. In other words we can say that, your website open with multiple url. and .htacess file on your root path where u can implement the code of the redirection.
    {{ DiscussionBoard.errors[9700507].message }}
  • Profile picture of the author Simon Walker
    The best way to resolve this issue by keeping all urls live is to add canonical tags in each page, Following are the Google guidelines for adding canonical tags

    https://support.google.com/webmaster...r/139066?hl=en
    {{ DiscussionBoard.errors[9700533].message }}
  • Profile picture of the author SEO-Dave
    Originally Posted by johncalkovich View Post

    How Can i resolve canonicalization issue ?and what is .htacess file?
    Some confusion in this thread. I think the OP is asking about how to resolve the www/non-www canonical URL issue which is where a website can be accessed via the www version and the non-www version.

    There are .htaccess rules which can easily resolve this, see 301 Redirect Htaccess section "301 Redirects Fixes the www/non-www Canonical Issue" for code examples for both the www and the non-www version (it's different code depending on your site, do you use the www or the non-www URLs?).

    Something related, but different to this is the canonical link element.

    In simple terms some content can be accessed by multiple URLs and this could confuse search engines and spread the SEO value you want on one webpage over several pages.

    There's a canonical link element which is a hidden value (like a meta tag) that informs search engines which is the preferred URL.

    If you have the same content which can be accessed via

    URL1
    URL2
    URL3

    You set the canonical URL to the preferred version.

    Code:
    <link rel="canonical" href="http://www.domain.com/preferred-url.html" />
    This is located in the head section of the HTML code.

    All URLs with the above code will pass SEO benefit to

    Code:
    http://www.domain.com/preferred-url.html
    It's not perfect, Google for example doesn't always honor the preferred URL, but it does most of the time.

    If all your content can only be accessed via one URL you don't NEED a canonical URL (no harm always setting one), this is for websites where there are multiple ways to access the same content. You'll find some shopping baskets can have dozens of ways to load the same content, with these you really do need canonical URLs set so search engines know to combine the SEO benefit to one webpage.

    David
    {{ DiscussionBoard.errors[9700654].message }}

Trending Topics