Hi. nicepage creates duplicate page always, and I don't believe it will change that.
To optimize the website for SEO what to do? Google always complaining about duplicate content.
index.html
main_page.html
canonical:
Should I put https://mydomain.com/main_page.html
or
Should I put https://mydomain.com/index.html
sitemap:
should I remove index.html if I put main_page.html as canonical?
Should I remove main_page.html if I put index.html as canonical?
.htaccess:
do I need to put if I put main_page.html as canonical?
DirectoryIndex main_page.html
I've made a custom 404.html page:
ErrorDocument 404 /404page.html
I think I should remove it from sitemap.xml? Correct? I already made it not index in nicepage, but it's always inserted in sitemap don't know why.
I'm sharing some info also about what I've in my .htaccess that I think everyone should have:
Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www.mywebsite.pt
RewriteRule ^(.*)$ https://mywebsite.pt/$1
Ensure HTTPS for all requests
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
<IfModule mod_headers.c>
# Enable Caching for Static Files
<FilesMatch ".(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$">
Header set Cache-Control "public, max-age=31536000" # One Year
# Don't Cache HTML Files (For SEO)
<FilesMatch ".(html|htm|php)$">
Header set Cache-Control "no-cache"
# ETag and Expires Headers for Static Files
<FilesMatch ".(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$">
Header set ETag MTIME
Header set Expires "Wed, 21 Apr 2025 15:48:00 GMT" # One Year from Now
Hi. nicepage creates duplicate page always, and I don't believe it will change that.
To optimize the website for SEO what to do? Google always complaining about duplicate content.
index.html
main_page.html
canonical:
Should I put https://mydomain.com/main_page.html
or
Should I put https://mydomain.com/index.html
sitemap:
should I remove index.html if I put main_page.html as canonical?
Should I remove main_page.html if I put index.html as canonical?
.htaccess:
do I need to put if I put main_page.html as canonical?
DirectoryIndex main_page.html
I've made a custom 404.html page:
ErrorDocument 404 /404page.html
I think I should remove it from sitemap.xml? Correct? I already made it not index in nicepage, but it's always inserted in sitemap don't know why.
I'm sharing some info also about what I've in my .htaccess that I think everyone should have:
Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.mywebsite\.pt
RewriteRule ^(.*)$ https://mywebsite.pt/$1
Ensure HTTPS for all requests
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
<IfModule mod_headers.c>
# Enable Caching for Static Files
<FilesMatch "\.(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$">
Header set Cache-Control "public, max-age=31536000" # One Year
# Don't Cache HTML Files (For SEO)
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "no-cache"
# ETag and Expires Headers for Static Files
<FilesMatch "\.(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$">
Header set ETag MTIME
Header set Expires "Wed, 21 Apr 2025 15:48:00 GMT" # One Year from Now
Last edited 06 June 2024 by joaopeixoto