Skip to content

Commit

Permalink
🐛 Removed redirects from search engine indexing (#15617)
Browse files Browse the repository at this point in the history
refs TryGhost/Product#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.
  • Loading branch information
allouis authored Oct 14, 2022
1 parent bd0f4b4 commit 8afc677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ghost/core/core/frontend/public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Sitemap: {{blog-url}}/sitemap.xml
Disallow: /ghost/
Disallow: /p/
Disallow: /email/
Disallow: /r/
3 changes: 2 additions & 1 deletion ghost/core/test/e2e-frontend/default_routes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ describe('Default Frontend routing', function () {
'User-agent: *\n' +
'Sitemap: http://127.0.0.1:2369/sitemap.xml\nDisallow: /ghost/\n' +
'Disallow: /p/\n' +
'Disallow: /email/\n'
'Disallow: /email/\n' +
'Disallow: /r/\n'
);
});

Expand Down

0 comments on commit 8afc677

Please sign in to comment.