Forum Moderators: goodroi

Message Too Old, No Replies

Google sitemap errors

Google sitemap errors

         

night707

4:42 am on Aug 5, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



What to do when the site map is is utterly clean. No redirects at all, all www according to preferred domain set to www and still receiving these odd warnings ...

When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

not2easy

5:27 am on Aug 5, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you can view your site with and without the "www" prefix google can too. Check that your preferred form (www or non www) is the only one accessible and that the rewrite is a 301. If the method used is in .htaccess, be sure it specifies 301 because otherwise the default is a 302 (temporary) rewrite.

night707

1:33 pm on Aug 8, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks not2easy! Preferred domain is set to www at .htaccess says Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^srilanka1.net [nc]
rewriterule ^(.*)$ [srilanka1.net...] [r=301,nc]

doesn't seem to help,mate ..

not2easy

2:36 pm on Aug 8, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Your rule rewrites all requests, (with and without www). In the RewriteCond part, you should escape the '.' with \. (as in example\.net). The [NC] flag adds more work for the server so unless you have links out there in caps, it is more efficient to leave it off. I did not mention the lower case used in the rule. Try to visit one of your website's pages without www and see if it gets changed to 'www' if you want to test whether it works or not.
Try it this way - and next time, please use "example.com" so a mod won't need to come in and make it readable. ;)
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

night707

3:08 pm on Aug 8, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Many thanks not2easy! just tested and it seems to work well. Hope, Google will like this too:-) Have a great day!

night707

9:30 am on Sep 22, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Sorry for bugging Not2Easy, but once again Google has started to complain about redirects, thought the url doesn't have any.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.domain\.com)?$
RewriteRule (.*) [domain.com...] [R=301,L]

Any idea, what could be done ?

not2easy

4:06 pm on Sep 22, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you have submitted a new sitemap after the 301 rewrite, and tested the URLs in your sitemap, and they are all shown in the proper (with www in your case) format, then I would suggest to use the GSC (old GWT) tools to "Fetch as Google". It may show you something that is not obvious. If it resolves just fine, I would click the "Submit to Index" button. If it is not resolving correctly you can try checking the headers to see the server responses yourself. It can help you find overlooked menu links or internal links. - or other problems.

If you are not familiar with checking headers, it is a process of viewing the server requests and responses during the loading of a page. It can be quite a large file to look through if there are a lot of scripts, images and other resources called during the page load. In each case you want to see a simple '200' response that means the resource was found and fetched. If you are seeing '302' responses that irritates google. There are tools such as browser extensions you can use and there is a HTTP Response Headers tool available here in the links at the bottom of the page, listed under Webmaster Tools.

night707

6:15 pm on Sep 22, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Many thanks for your advise. Many sitemap updates have been submitted since then.

Did a the header check and a clean 200 came up. Used the too here and another one. Also GWT fetch did not show any issues.

Strange :-)

night707

6:26 pm on Sep 22, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Many thanks for your advise!

Header tests were clean, 200

Google fetch could load everything except this here blocked by robots text ...

[pagead2.googlesyndication.com...]
[oauth.googleusercontent.com...]

not2easy

7:09 pm on Sep 22, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Google sometimes seems to pull old sitemaps out of their archives and that may be what is causing the "redirect" issues. If that is the case you may notice 404s for pages you deleted years ago. Sometimes they go for months without this quirk, then they start again. I try to mark them fixed and ignore them.

If you've checked and the rewrite is working fine, I would tend to blame the redirect warning on their practices. Information and warnings shown in the GSC can help to point you to things that need attention such as the original non-www/www issue, but their information is not always real time, up to date information. So once you have addressed the problem, all you can do is be patient while they notice.

night707

8:53 am on Sep 23, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks not2easy! That might be the reason. Have a great day!