How to solve canonicalization issue or what is htacess file?

Author Topic: How to solve canonicalization issue or what is htacess file?  (Read 1816 times)

Offline Roy MilsonTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 11
  • Posts: 137
  • Karma: 0
How to solve canonicalization issue or what is htacess file?


Offline SerenMckay

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 10
  • Posts: 52
  • Karma: 0
.htacess file is used to solve the canonicalization issue of a website. It may happen that the home page of the site may take several urls like

1. www.abc[dot]com (with www)
2. www.abc[dot]com/index.html (Index page)
3. abc.com (without www)

The search engines might treat these URL as different and may divide the link juice gained by having various backlinks made with any of these 3 URLs. The link juice gets divided between these three URLs equally. .htacess file is created to have a single URL of the home page so that the link juice is passed onto single URL.

Offline JohnVilson

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 13
  • Posts: 128
  • Karma: 0
    • Website Designing Company in Mumbai
First of all, you need to know about your site have which types of server. Mostly these types of server use a htaccess file:
1- Linux, 2- Apache
​​​​​​​
If your hosting account uses one of these types of the server then you can copy below code into your htaccess file by SEO companies.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ example[dot]com [NC]
RewriteRule ^(.*)$ www[dot]example[dot]com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . www[dot]example[dot]com%1%2[R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/
RewriteRule index\.html$ www[dot]example[dot]com%1 [R=301,L]\

Note: In red highlights, you need to replace example.com with your domain name and in green highlights, you need to replace with your .html or .php index page. Keep in mind do not write just index, write extension too.

After the copy, this code with your htaccess old code, Save it and upload to your root folder where your site has the index page. Hope it will solve.

Offline RH-Calvin

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 86
  • Posts: 1214
  • Karma: 0
  • Gender: Male
    • Cheap VPS Hosting
.htaccess is a configuration file for use on web servers running the Apache Web Server software. ... These .htaccess files can be used to alter the configuration of the Apache Web Server software to enable/disable additional functionality and features that the Apache Web Server software has to offer.

Offline Usman Shani

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 8
  • Posts: 47
  • Karma: 0
    • SeoGroupBUy
The best and most effective way to resolve the canonical issue is with a permanent 301 redirect. This can be implemented in a number of ways, as detailed below. Depending on what server your website is hosted on will determine the method which you use to implement a redirect.


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1488 Views
Last post 06-05-2012, 23:29:00
by motorbikestore
19 Replies
14548 Views
Last post 11-11-2014, 01:44:19
by davidfleming
6 Replies
2878 Views
Last post 08-23-2016, 09:03:49
by RH-Calvin
3 Replies
1694 Views
Last post 08-23-2016, 05:32:32
by TomClarke
0 Replies
790 Views
Last post 04-02-2016, 04:57:02
by chinmay.sahoo