1

Or, in other words, how can I tell google this is a user login protected page?

The website is basically a single page app with server side rendering. That said, if the visitor is asking for a web page by text/html, the server will do server side rendering to show the html, and download all the app. After that, the app will has its own routing and navigate to the page inside the app. The app only ask for data if necessary.

Now, google show me a warning Indexed, though blocked by robots.txt, the url is actually one url of the user's account pages. It's protected, of course.

If google visit the url, it will see 200 http code, then download the html, but it's actually an empty container. Then, since this visitor is not logged in. The app will immediately navigate to the sign-in route.

I guess this warning will bring negative impact to our SEO. I'm wondering what should I do for Google SEO, because our seo is quite bad now.

1.Respond with 403 and all the html/app, and navigate to sign in after the app is mounted?

2.Just like traditional website, respond with 302 to redirect google to sign-in page, and request the server again?

Appreciated for your time to let me know what's the correct way to tell google this is an user login required page. It seems it's so hard to please google.

0

I think you'll want to go for the 403 - which Google shouldn't attempt to index and will remove from it's index. If it's a page that only has content behind a login, it should just be removed.

A 302 suggests that the content has temporarily moved, which isn't the case, and you might find Google indexing the login page and treating it as the URL for the protected user account page, which isn't what you want.

  • mmm....thank you for your suggestion. However, I also see service like maxcdn, they also respond 200 code and redirect the user to sign-in inside their single page app immediately. Wondering if any online document from Google to explain their rules to detect single page app's user login protected pages. – Ben P.P. Tung Jul 31 at 16:38
  • Have you configured Webmaster tools for this domain? You should see warnings etc. direct from Google bot that should help point you in the right direction. You mention 'they respond 200 OK and redirect' for MaxCDN. That's almost certainly incorrect as a 200 OK response code shouldn't initiate a redirect and will be confusing for bots. – Squiggs. Aug 1 at 7:53
  • Hi Squiggs, yes, I've configured Google search console, so I know this warning. Previously an error in early May, I don't know what it is, but since that day, our search ranking is dropping a lot, so I take this warning seriously. I've posted this question in Google too, but their explanation is to add noIndex markup. So, I've changed to 403 and add X-Robots-Tag:noindex header, now the warning is done. Thank you for your help :) – Ben P.P. Tung Aug 13 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.