Black Friday Sale! Save up to 50% off!

SEO optimization

joaopeixoto
82 Posts
joaopeixoto posted this 06 June 2024
Ask a Question

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&#39;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&#39;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&#39;s always inserted in sitemap don&#39;t know why. I&#39;m sharing some info also about what I&#39;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} &lt;IfModule mod_headers.c&gt; # Enable Caching for Static Files &lt;FilesMatch &quot;\.(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$&quot;&gt; Header set Cache-Control "public, max-age=31536000" # One Year # Don&#39;t Cache HTML Files (For SEO) &lt;FilesMatch &quot;\.(html|htm|php)$&quot;&gt; Header set Cache-Control "no-cache" # ETag and Expires Headers for Static Files &lt;FilesMatch &quot;\.(ico|css|js|jpg|jpeg|png|gif|svg|woff|woff2|eot|ttf|otf)$&quot;&gt; 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

Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
joaopeixoto
82 Posts
joaopeixoto posted this 07 June 2024

I think I should only do this:

Canonical:
https://mydomain.com/main_page.html

Remove in Sitemap:
https://mydomain.com/index.html

In .htaccess I don't need to insert:
DirectoryIndex main_page.html

In .htaccess I need to insert this:
ErrorDocument 404 /404page.html

This file should be marked as "don't show the page in search results"
Also remove from sitemap 404page.html

If this is true, this should be as default creating a new website. Nicepage only needs to insert the main page as canonical as default and when it creates the sitemap, it should not duplicate the entrances.
Also, If I put any page to not show in search results, it still appears in sitemap created by Nicepage. This should not happen. (I have already worn you about that, still no fix)

I think I should only do this: Canonical: https://mydomain.com/main_page.html Remove in Sitemap: https://mydomain.com/index.html In .htaccess I don't need to insert: DirectoryIndex main_page.html In .htaccess I need to insert this: ErrorDocument 404 /404page.html This file should be marked as "don't show the page in search results" Also remove from sitemap 404page.html If this is true, this should be as default creating a new website. Nicepage only needs to insert the main page as canonical as default and when it creates the sitemap, it should not duplicate the entrances. Also, If I put any page to not show in search results, it still appears in sitemap created by Nicepage. This should not happen. (I have already worn you about that, still no fix)
You must log in or register to leave comments