Skip to main content
edited tags
Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90
Formatting, exemplified domain name according to RFC2606 (please use "example.com")
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

Ahrefs is returning a series of duplicate content URLs for my own website i've asked them about and which they've said needs to be addressed on the CMS side, and which they cannot help with.

The issues seem to stem from their Ahrefs Platform identifying these two URL structures:

https://mywebsite.com

https://example.com

and

https://www.mywebsite.com

https://www.example.com

This has been driving me crazy for ages now (on a different domain) - my question is, is there a way, by using something like the .htaccess file (or possibly on the webhost side), to address this issue?

The webhost (ionos) appears to have added the following line/s to the .htaccess file in the last month, which as I understand it addresses directing visitors from http: to https (unless I'm wrong):

RewriteEngine On

RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L]

RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

I'm also uncertain as to whether this is having an impact on the duplicate content question?

I'll apologise in advance if this is covered elsewhere - I have trawled for the answer on stackexchangeStackExchange, but iI cannot come to grips with (a) exactly what the problem is, and (b) how specifically to address it.

Ahrefs is returning a series of duplicate content URLs for my own website i've asked them about and which they've said needs to be addressed on the CMS side, and which they cannot help with.

The issues seem to stem from their Ahrefs Platform identifying these two URL structures:

https://mywebsite.com

and

https://www.mywebsite.com

This has been driving me crazy for ages now (on a different domain) - my question is, is there a way, by using something like the .htaccess file (or possibly on the webhost side), to address this issue?

The webhost (ionos) appears to have added the following line/s to the .htaccess file in the last month, which as I understand it addresses directing visitors from http: to https (unless I'm wrong):

RewriteEngine On

RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L]

I'm also uncertain as to whether this is having an impact on the duplicate content question?

I'll apologise in advance if this is covered elsewhere - I have trawled for the answer on stackexchange, but i cannot come to grips with (a) exactly what the problem is, and (b) how specifically to address it.

Ahrefs is returning a series of duplicate content URLs for my own website i've asked them about and which they've said needs to be addressed on the CMS side, and which they cannot help with.

The issues seem to stem from their Ahrefs Platform identifying these two URL structures:

https://example.com

and

https://www.example.com

This has been driving me crazy for ages now (on a different domain) - my question is, is there a way, by using something like the .htaccess file (or possibly on the webhost side), to address this issue?

The webhost (ionos) appears to have added the following line/s to the .htaccess file in the last month, which as I understand it addresses directing visitors from http: to https (unless I'm wrong):

RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

I'm also uncertain as to whether this is having an impact on the duplicate content question?

I'll apologise in advance if this is covered elsewhere - I have trawled for the answer on StackExchange, but I cannot come to grips with (a) exactly what the problem is, and (b) how specifically to address it.

Source Link
spl
  • 37
  • 6

Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?

Ahrefs is returning a series of duplicate content URLs for my own website i've asked them about and which they've said needs to be addressed on the CMS side, and which they cannot help with.

The issues seem to stem from their Ahrefs Platform identifying these two URL structures:

https://mywebsite.com

and

https://www.mywebsite.com

This has been driving me crazy for ages now (on a different domain) - my question is, is there a way, by using something like the .htaccess file (or possibly on the webhost side), to address this issue?

The webhost (ionos) appears to have added the following line/s to the .htaccess file in the last month, which as I understand it addresses directing visitors from http: to https (unless I'm wrong):

RewriteEngine On

RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L]

I'm also uncertain as to whether this is having an impact on the duplicate content question?

I'll apologise in advance if this is covered elsewhere - I have trawled for the answer on stackexchange, but i cannot come to grips with (a) exactly what the problem is, and (b) how specifically to address it.