We have taken over an old episerver 6.2 project at work that I'm currently doing some SEO optimizing on. And I want to redirect with a 301 to the 404 page when a page is not found. Currently the solution redirects with a 302 like so:
We have tried making a custom 301 redirect but that will only handle the second 301 redirect to the 404 and not the first (sdgh <- a page that doesn't exist). which is the one google will look at.>->
Is there any way to hook into the way episerver handles the first redirect for pages that doesn't exist?
Thanks in advance
Also I'm sure you will have an opinion to how to handle redirects to a 404, but this is how we want to do it :)
Your image isn't working.
Please have a look this blog post http://dodavinkeln.se/post/how-to-create-an-editable-404-page on how to set up a 404 page. You also need to turn of EPiServer's global error handling.
<applicationSettings globalErrorHandling="Off" />
This will not create a redirect at all, which is the preferred way. Or is there a specific reason why you want to have a redirect?
That's weird. I can see the picture just fine.
What about this picture?
There is already set up a 404 page on the site. But not quite the way you do it in your link (thanks for that). I will try and edit my webconfig and add the <customerrors> under <system.web>