Ghost blog pro-tip: Fix those 404s for AMP pages
If you update URLs in Ghost, make sure to put the "amp/" redirect in your redirects.json file as well. Read on!
This is a quick pro-tip for Ghost Blog users out there.
I recently changed a URL for SEO purposes and updated my redirects.json
. However, you will also want to add the amp/
to the redirects as well. If you don't do that then some AMP users might get 404s when clicking links from Google or elsewhere.
Here is the file in question:
[
{
"from": "/ghost-file-downloads-with-docker-and-filebrowser/",
"to": "https://www.simplecto.com/ghost-file-downloads-with-docker-traefik-filebrowser/"
},
{
"from": "/ghost-file-downloads-with-docker-and-filebrowser/amp/",
"to": "https://www.simplecto.com/ghost-file-downloads-with-docker-traefik-filebrowser/amp/"
}
]
Also, make sure you have registered your page with Google Web Master tools so that you can get alerts on 404s. I found it pretty convenient.