Harish Amilineni Solution to duplicate content on your website

0
531
Solution to duplicate content on your website

Having duplicate content means that several URLs have the same content, this being a negative factor to be considered redundant content or plagiarism in case the content is associated with different domains. This is a very common problem that can have negative consequences for the positioning in Google of your web page . Generally, duplicate content occurs when your home page has more than one URL and each one leads to the same page with the same content, so it is necessary to indicate to Google which is the correct URL so that it can be properly positioned. There are three common problems and solutions as options to eliminate duplicate content when it is the same or very similar.

Contents

  • What to do if it is possible to access the same content through different URLs?
  • How to redirect several URLs at the same time?
    • Redirect to the URL with or without www
  • The canonical label: When we have different versions of the same content,

What to do if it is possible to access the same content through different URLs?

In this case we can do a redirection from one page to another, making sure that it is only possible to access one of the addresses. This solution, in general, is applied when we only have one content but, due to problems in the management of URLs, it is possible to access it through several URLs. To achieve this we have to edit the .htaccess file that is in the root directory of our website , as long as we use the Apache server. If the file does not exist, we will have to create it. To edit or create it, we can access our website via FTP, using an FTP client such as Filezilla or another similar program.

For example, if we want to redirect the URL “old-url” to another URL “new-url”, we have to edit the .htaccess file and add the following line:

Redirect 301 / vieja-pagina http://www.miweb.com/nueva-pagina

After this redirection, we can verify that there is only one page visible and accessible to users. Now, when we access the URL / old-page , we will be redirected to the URL / new-page .

How to redirect several URLs at the same time?

This case occurs when, for example, it is possible to access our website both with the prefix www in front of our domain and without the prefix www. That is, we could access the same URL in the following ways:

  • http://miweb.com/nueva-pagina
  • http://www.miweb.com/nueva-pagina

This is considered as duplicate content for some search engines like Google and, to fix it, we must create a rule that redirects all addresses that follow a certain pattern. Here you can find more information to manage the redirections through the .htaccess file .

Redirect to the URL with or without www

The first thing that is recommended to do is to enter Google Search Console and choose our favorite version from the version of our website that has “www” and the one that does not have “www” .

To redirect from the version with www to the one without www, we will have to add the following lines to our .htaccess file:

Options + FollowSymlinks
RewriteEngine On
RewriteCond% {HTTP_HOST}! ^ Www. [NC]
RewriteRule ^ http: //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301]

To redirect from the version without www to the one that carries www, we will have to add the following lines to our .htaccess file:

Options + FollowSymlinks
RewriteEngine On
RewriteCond% {HTTP_HOST} ^ www. (. +) $ [NC]
RewriteRule ^ http: //% 1% {REQUEST_URI} [L, R = 301]

The canonical label: When we have different versions of the same content,

When we have different versions of the same content and this one is very similar, we can let our users access both versions, but we will have to tell Google which of the versions is the one that should be indexed. To do this, we can add a tag in our HTML code to tell search engines if the current version is correct or if the contractor must index another version of the content.

The label that we must add is the “rel = canonical” tag  in each version of the same content. In this way we will indicate to Google and the other search engines which is our canonical or main version. This will significantly improve the process of indexing and positioning your website in SERPS. This tag will be placed in the <head>section of our website. An example of a canonical label could be:

<link rel = "canonical" href = "http://www.my-domain.com/my-url.html" />

The pages that contain the previous label will not be indexed, since Google and the other search engines will choose to index the URL that we have indicated instead. To apply the canonical label correctly in terms of SEO, we simply have to follow these simple steps that are explained below:

  • First, select which will be your canonical or main page.
  • Then, choose which or which will be your secondary pages that can compete in the positioning with the canonical. Generally they are pages with very similar content.
  • Subsequently, add the canonical label to the secondary pages indicating which is the main page between “<head>” and “</ head>” .
  • Finally, place the canonical label on the main or favorite page linking itself between “<head>” and ” </ head>” .