Google Webmaster Console ignores my sitemap.xml because of _redirects.txt

Website: worthashot.netlify.app

My problem

Google Webmasters Console (aka Google Search Console) does not index my different pages of my Angular website, although I have provided a fully working sitemap.xml. I think it’s because of Angular being an SPA and using _redirects.txt.

I enabled Prerendering into hoping it would help, but I have no clue how I could see whether it works. I can’t see what pages have been prerendered, nor whether Google Search Console is too slow with reanalyzing my sitemap.

My sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url><loc>http://worthashot.be</loc><priority>1</priority></url>

<url><loc>http://worthashot.be/about</loc><priority>1</priority></url>

<url><loc>http://worthashot.be/game/create</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/game/play</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/privacy-policy</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/cookie-policy</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/login</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/register</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/upcoming-features</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/blog</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/store</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/store/products</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/blog/read/a969e9b7-bbc2-4fb6-874b-81325702fd6f/Circle%20of%20Death%20now%20in%20beta</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/blog/read/921e249e-f757-426a-ba4b-10cd64168ebf/How%20was%20WorthaShot%20created%3F</loc><priority>0.5</priority></url>

<url><loc>http://worthashot.be/blog/blog/read/ad9ec09d-02fa-44f9-a159-1b534eb62f08/What%20is%20FizzBuzz%3F</loc><priority>0.5</priority></url>

<url><loc>http://discord.worthashot.be</loc><priority>0.75</priority></url>

<url><loc>http://www.worthashot.be</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/game/create</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/game/play</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/privacy-policy</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/cookie-policy</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/upcoming-features</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/login</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/register</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/blog</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/store</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/store/products</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/blog/read/a969e9b7-bbc2-4fb6-874b-81325702fd6f/Circle%20of%20Death%20now%20in%20beta</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/blog/read/921e249e-f757-426a-ba4b-10cd64168ebf/How%20was%20WorthaShot%20created%3F</loc><priority>0.5</priority></url>

<url><loc>http://www.worthashot.be/blog/read/ad9ec09d-02fa-44f9-a159-1b534eb62f08/What%20is%20FizzBuzz%3F</loc><priority>0.5</priority></url>

<url><loc>http://discord.worthashot.be</loc><priority>0.75</priority></url>

</urlset>

My _redirects.txt

http://worthashot.netlify.com/* https://worthashot.netlify.com/:splat 301!
/* /index.html 200

2 questions:

  1. Are you really using _redirects.txt? If yes, you’re not really using that file. The file is supposed to be _redirects and not _redirects.txt.

  2. Why exactly have you added the first redirect rule? Netlify anyways redirects to HTTPS, so explicitly adding a redirect rule for that won’t do any good. Also, Netlify dropped .com sub-domains long back. Now, .app sub-domains are used.

1 Like
  1. I’m fairly sure because redirects now do work, they didn’t before. However, where could I double check?
  2. I guess I’ll remove it then, but I don’t think that would have an impact on my issue. My main issue is that I need to add redirects for paths to work, but that causes Google to not properly interpret the URLs as unique but simply as redirects.

On the deploy details page, Netlify shows if it parsed any redirect rules.

Yes, prerendering is meant to solve this issue because this is one of the primary issues with a SPA. If it’s working for you or not, maybe a Support Engineer from Netlify, maybe @luke or @jen would be able to provide you insights with that.

1 Like

Hi, @rubenszeker. Note, Google doesn’t see the 200 redirect rules:

Google only sees the 200 response. They do not see a redirect. It is completely invisible to them.

Now, what is happening at Google, that I do not know. I have no way of seeing what is happening at Google or why things there do or do not work.

As your application does do client-side routing, Google will get the same index.html file for all your URLs which are not static files. Based on this, it does sound like prerendering might be the solution you need.

1 Like

Hi @luke

Thanks for your time and answer.

Could you elaborate a bit on the prerendering part? I’ve enabled it since yesterday, but I don’t see any configurations, extra information or feedback from the functionality. How can I know if it’s working or doing its job?

hi there, this guide is a great place to start:

1 Like