I recently migrated my website to Ghost CMS and am dealing with an issue regarding spammy URLs left over from a malware attack. Many of these URLs are still live and redirect to my homepage, while others return 404 errors. I want to serve a proper "410 Gone" status for these pages to inform search engines and users that the content is permanently removed.
The steps I've tried so far:
1. I have already set up a custom 404 page in Ghost, but I want certain URLs to return a "410 Gone" status instead of 404.
2. I created a page at "/410-gone" but it still returns a "200 OK" status, not the 410.
3. I edited the "redirects.yaml" file in Ghost to set specific URLs to redirect to "/410-gone" with a status of 410, but it seems to still return a 200.
4. I am using Cloudflare and I couldn’t find a direct option for returning a 410 status (Cloudflare only allows 301-308 redirects).
My Questions:
1. How can I set up a page in Ghost CMS that correctly returns a "410 Gone" status code for specific URLs?
2. Is it possible to serve a 410 response for a page using "Cloudflare", and how would I configure this (list the steps)?
3. Can I use the same 404 page but change its response to 410 for certain URLs, or do I need a completely separate page for this?
4. Are there any best practices to handle these types of spammy URLs left over from a malware attack, especially regarding SEO and search engine crawling?
Any insights or examples of how to properly configure this in Ghost CMS and/or Cloudflare would be greatly appreciated!
The steps I've tried so far:
1. I have already set up a custom 404 page in Ghost, but I want certain URLs to return a "410 Gone" status instead of 404.
2. I created a page at "/410-gone" but it still returns a "200 OK" status, not the 410.
3. I edited the "redirects.yaml" file in Ghost to set specific URLs to redirect to "/410-gone" with a status of 410, but it seems to still return a 200.
4. I am using Cloudflare and I couldn’t find a direct option for returning a 410 status (Cloudflare only allows 301-308 redirects).
My Questions:
1. How can I set up a page in Ghost CMS that correctly returns a "410 Gone" status code for specific URLs?
2. Is it possible to serve a 410 response for a page using "Cloudflare", and how would I configure this (list the steps)?
3. Can I use the same 404 page but change its response to 410 for certain URLs, or do I need a completely separate page for this?
4. Are there any best practices to handle these types of spammy URLs left over from a malware attack, especially regarding SEO and search engine crawling?
Any insights or examples of how to properly configure this in Ghost CMS and/or Cloudflare would be greatly appreciated!