pressbooks / pressbooks-book-directory-fe

A Vue.js frontend for the Pressbooks Directory
0 stars 1 forks source link

Discourage search engines from indexing dev & staging directories #138

Closed richard015ar closed 3 years ago

richard015ar commented 3 years ago

When Pressbooks Directory is searched in Google, the top result is the Staging environment version.

Psuedocode: If env !=prod echo <meta name="robots" content="noindex, nofollow" />

Ricardo to review. Oscar & Ricardo to test.

richard015ar commented 3 years ago

Recommendations for SEO optimizations:

The production website was submitted to: https://search.google.com/search-console?resource_id=sc-domain%3Apressbooks.directory

richard015ar commented 3 years ago

It was deployed to Staging, it is ready for testing.

How to test

These metadata: https://github.com/pressbooks/pressbooks-book-directory-fe/pull/162/files#diff-7a7a37b12ee1265d7e27577ec286120d2cbc0940908635e264a2be44ccb9a8a0R72-R90 Should be present in the DOM (head section). And this metadata: https://github.com/pressbooks/pressbooks-book-directory-fe/pull/162/files#diff-7a7a37b12ee1265d7e27577ec286120d2cbc0940908635e264a2be44ccb9a8a0R101-R104 Should be present in Staging. Also, the robots.txt file should be present in https://staging.pressbooks.directory/robots.txt and https://dev.pressbooks.directory/robots.txt.

Once it is deployed to production: