-
Hi, in google search i get this error for specifict pages “Indexed, not submitted in sitemap” under Coverage.
the link is in the site map and if i do a google search i can find it in the resuts.
HOw can i fix this error on search console?
Thx
-
Hi, i contacted the server provider and they told me they cannot do it.
I believe i should be doing it from the htaccess file. Would you have the right code for it?
this is the link for the google search console https://ibb.co/kmXySz7
Hello,
I’ve checked your site, and it seems that the final version is the non-WWW.
Here’s a sample redirect you can add to your
.htaccess
file to redirect your WWW site to non-WWW.RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
I hope that helps.
Thank you.
would this redirect to https since is is a https site? i dont see that stated in the code RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Also the sitemap now has been crawled correctly in google i think. please see screenshot. DO i still need to apply the htaccess changes?
Hello,
The rule to achieve both of the results should look similar to this:
# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301] </IfModule>
Regarding the sitemap we can’t see the image that you shared, but if you already see the sitemap being correctly crawled by Google Search Console that’s a good sign.
In spite of that, we still recommend that you implement the redirection to have only a single version of your website returning a successful status.
Don’t hesitate to get in touch if you have any other questions.
I have made the modification. any way i can check if was done correctly?
Hello,
Thank you for your patience.
You can check using this tool:
https://httpstatus.io/Upon checking, it seems that the WWW is still not redirecting to the final version. Please check for any redirection in your
.htaccess
file since the code provided above is already for both HTTP to HTTPS and WWW to non-WWW.You can also try using a default .htaccess file and adding the code. Here’s the link for your reference:
https://wordpress.org/support/article/htaccess/Please take a backup of your current .htaccess file before proceeding.
I hope that helps.
Thank you.
I tried the above but nothing works.
Let me step back for a minute. I have a multisite installation but the rankmath plugin is only active on my subsite and not on the network. Was this a mistake?
I have activate it on the network also but still not redirection.
Hello,
The plugins should be activated on the subsite and not on the network because some modules don’t work properly when the data is shared via the network.
Please revert the installation to the subsites.
Also, to get to the bottom of this, please tell us what is the variation of the property you have on Google Search Console (either www or non-www, HTTP or HTTPS). This should match the exact variation of your website.
Looking forward to hearing back from you.
Hi, having the plugin on the network also or not does not change anything i found out.
On google serch console i only have 1 version https non www
Hello,
This error about a URL being indexed and not submitted usually means that the sitemap is cached.
To prevent that please add the following filter:
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
After doing that, please re-submit the main sitemap following this guide: https://rankmath.com/kb/submit-sitemap-to-google/
Then, wait a couple of days for Google to crawl the sitemap and see the updated results to fix the error.
Don’t hesitate to get in touch if you have any other questions.
HI I have already this on my htaccess which should be prevent from caching.
RewriteEngine On
RewriteRule .* – [E=Cache-Control:no-cache]where should i enter the code you suggested?
Hello,
You can add the code shared by my colleague in your theme’s functions.php file.
You can also follow this guide to add the code:
https://rankmath.com/kb/wordpress-hooks-actions-filters/Hope this helps.
Thank you.
HI I have done the modification suggested and still no luck with the sitemaps.
Any other suggestons?
Hello,
To further troubleshoot this could you please add the following email as a user on your GSC temporarily?
j******@r***********
You can do that with the following tutorial: https://www.mariehaynes.com/add-new-user-gsc/
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
The ticket ‘Indexed, not submitted in sitemap’ is closed to new replies.