Pages with and without www are treated as Duplicate
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Pages with and without www are treated as Duplicate
Hi
I am trying to resolve this issue that is hurting my SEO. Basically my site www.videoproductions.ie and videoproductions.ie are the same site but google see them as duplicates. I've been trying to use this site https://www.danielmorell.com/tools/htac ... -generator to create the code to edit mine htaccess but its not working for me so far.
The site is also showing up connect is not secure (not sure if this issue is related) https://pasteboard.co/IQeBFa4.png
I am trying to resolve this issue that is hurting my SEO. Basically my site www.videoproductions.ie and videoproductions.ie are the same site but google see them as duplicates. I've been trying to use this site https://www.danielmorell.com/tools/htac ... -generator to create the code to edit mine htaccess but its not working for me so far.
The site is also showing up connect is not secure (not sure if this issue is related) https://pasteboard.co/IQeBFa4.png
- Per Yngve Berg
- Joomla! Master
- Posts: 27414
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Pages with and without www are treated as Duplicate
Delete *.videoproductions.ie from dns and keep www.videoproductions.ie only.
- leolam
- Joomla! Master
- Posts: 20243
- Joined: Mon Aug 29, 2005 10:17 am
- Location: Netherlands/ UK/ S'pore/Jakarta/ North America
- Contact:
Re: Pages with and without www are treated as Duplicate
That is no need....https://intodns.com/videoproductions.iePer Yngve Berg wrote: ↑Thu Jan 16, 2020 2:46 pmDelete *.videoproductions.ie from dns and keep www.videoproductions.ie only.
Just place a rule in .htaccess as follows:
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
Leo

Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
#Joomla Webmaster Services: gws-webmaster.services
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
#Joomla Webmaster Services: gws-webmaster.services
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
Per Yngve Berg wrote: ↑Thu Jan 16, 2020 2:46 pmDelete *.videoproductions.ie from dns and keep www.videoproductions.ie only.
Thanks but where and how do I do this?
- Per Yngve Berg
- Joomla! Master
- Posts: 27414
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Pages with and without www are treated as Duplicate
Your host's Cpanel should have what is called "Zone Editor"
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
Per Yngve Berg wrote: ↑Thu Jan 16, 2020 7:15 pmYour host's Cpanel should have what is called "Zone Editor"
I seem to have a lot in my DNS see snap shot https://pasteboard.co/IQh779T.png
I'm afraid to delete the wrong thing?
- Per Yngve Berg
- Joomla! Master
- Posts: 27414
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Pages with and without www are treated as Duplicate
Only look at the A (Ipv4) and AAAA (Ipv6) type records.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
sorry I've accidentally marked this as resolved but it has given me an additional error I now have
under Url resolved I now have an additional warning ENOTFOUND at http://videoproductions.ie/
under Url resolved I now have an additional warning ENOTFOUND at http://videoproductions.ie/
- colourrich
- Joomla! Apprentice
- Posts: 23
- Joined: Thu Dec 12, 2019 4:47 pm
- toivo
- Joomla! Master
- Posts: 13095
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Zagreb, Croatia
Re: Pages with and without www are treated as Duplicate
Mark removed.anaconda1977 wrote:I've accidentally marked this as resolved
Where exactly is that new warning, or did you manage to fix it?
Toivo Talikka, Global Moderator
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
I think my google console has the two domains listed see attached image. https://pasteboard.co/IQmJVqD.png is that right?
I am getting the warning from woo rank and other SEO performance checking tools. This is what woo is saying
Warning, no 301 redirects are in place to redirect traffic to your preferred domain. Pages that load successfully both with and without www. are treated as duplicate content!
Not all versions of your page point to the same URL.
There is also an issue with
https://videoproductions.ie/ DEPTH_ZERO_SELF_SIGNED_CERT
https://www.videoproductions.ie/ DEPTH_ZERO_SELF_SIGNED_CERT
My site is appearing as not secure on firefox and other platforms. Not sure if these two issue are the same.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
Below is my www.videoproductions.ie .htaccess at the moment
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##
## No directory listings
<IfModule autoindex>
IndexIgnore *
</IfModule>
## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>
## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes
## Mod_rewrite in use.
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
# RewriteBase /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##
## No directory listings
<IfModule autoindex>
IndexIgnore *
</IfModule>
## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>
## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes
## Mod_rewrite in use.
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
# RewriteBase /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Feb 12, 2014 11:20 am
Re: Pages with and without www are treated as Duplicate
Sorry I missed your post in this thread!....Is my google console set correctly see pic https://pasteboard.co/IQmJVqD.pngleolam wrote: ↑Thu Jan 16, 2020 5:08 pmThat is no need....https://intodns.com/videoproductions.iePer Yngve Berg wrote: ↑Thu Jan 16, 2020 2:46 pmDelete *.videoproductions.ie from dns and keep www.videoproductions.ie only.
Just place a rule in .htaccess as follows:You should replace yourdomain.com with your actual domain name. This solves your issue. Also make sure that you have set both as domain in Google webmaster ConsoleCode: Select all
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
Leo![]()
so for my site the code would be
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.videoproductions.com [NC]
RewriteRule ^(.*)$ http://www.videoproductions.ie/$1 [L,R=301]
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^videoproductions.com [NC]
RewriteRule ^(.*)$ http://videoproductios.ie/$1 [L,R=301]