🐛 Removed redirects from search engine indexing (#15617)

refs https://github.com/TryGhost/Team/issues/2072

Google is indexing our redirects and storign the redirected content
against the redirect URL in search results. This seems to be caused by
us using a 302 redirect rather than 301. We don't want to switch to a
301 however, so that we can support the ability to update redirects in
the future.
This commit is contained in:
Fabien 'egg' O'Carroll 2022-10-14 09:51:43 +01:00 committed by GitHub
parent bd0f4b4b8c
commit 8afc6777c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -3,3 +3,4 @@ Sitemap: {{blog-url}}/sitemap.xml
Disallow: /ghost/ Disallow: /ghost/
Disallow: /p/ Disallow: /p/
Disallow: /email/ Disallow: /email/
Disallow: /r/

View File

@ -326,7 +326,8 @@ describe('Default Frontend routing', function () {
'User-agent: *\n' + 'User-agent: *\n' +
'Sitemap: http://127.0.0.1:2369/sitemap.xml\nDisallow: /ghost/\n' + 'Sitemap: http://127.0.0.1:2369/sitemap.xml\nDisallow: /ghost/\n' +
'Disallow: /p/\n' + 'Disallow: /p/\n' +
'Disallow: /email/\n' 'Disallow: /email/\n' +
'Disallow: /r/\n'
); );
}); });