An SEO tool I am using has made this suggestion:
Quote:
Some websites have www in front of their domain, like www.google.com. Others don't, like dribbble.com.
If your website works on the domain www and the one without, you have two identical websites on a different URL. Google will consider that duplicate, and lower your rankings.
There's an easy fix: redirect all your traffic to www. If you have an Apache server, add this to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
However, I am using Nginx and not Apache so that "easy fix" isn't applicable to me. Here is my config file for Nginx:
Link: https://pastebin.com/zsKbtawz
Any assistance would be greatly appreciated.
Quote:
Some websites have www in front of their domain, like www.google.com. Others don't, like dribbble.com.
If your website works on the domain www and the one without, you have two identical websites on a different URL. Google will consider that duplicate, and lower your rankings.
There's an easy fix: redirect all your traffic to www. If you have an Apache server, add this to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
However, I am using Nginx and not Apache so that "easy fix" isn't applicable to me. Here is my config file for Nginx:
Link: https://pastebin.com/zsKbtawz
Any assistance would be greatly appreciated.