Try our conversational search powered by Generative AI!

404 NonFound handler Plugin


404 NonFound Handler plugin is not working for some of the redirects that we set up, while it works for some others. Is there a limit on total redirects that we can set up?  There are about 428 URLs we have setup

Following are not working:

Also, how do I set wild card for these?


Edited, May 04, 2023 19:20

Are you sure the one that don't work don't have active pages on those URLs? It's a 404 handler so it only works when a 404 is served e.g. no content in Optimizely on that route

May 04, 2023 21:32

Also there's a section on the docs that explains wildcards 

May 04, 2023 21:33

@Scott Reed, When you say active pages, how do I deactivate a page in Optimizely/Epi? So this 404 handler won't do redirects? Is there a good plugin for CMS 12 (.NET 6) that is a redirect manager?

May 08, 2023 16:30

This is a good plugin to do redirects, but it will only redirect urls that does not exist in the CMS. If you have a page somewhere with the same url as you're trying to redirect, it won't, because pages have priority.

May 09, 2023 14:24

We use the Geta Notfound Handler on all our CMS 12 builds and it does a fantastic job.  Yes it will not perform a redirect if the content exists and it is published. The question is why would you want a redirect if the content exists and is published?  Surely in this case the content is undesired and should be removed or unpublished.  If the page is expired, it will return a 404 and the Geta NotFound handler redirect will work.

You can expire a page by following these steps:

  1. Go to the All Properties view for the page in question
  2. Click on the Tools drop down
  3. Select Manage Expiration and Archiving
  4. Set the Expire Date to when the content should expire
  5. Click save.

Then your redirects in the Geta Notfound handler will work.

May 10, 2023 7:58

@Mark Stott That is very helpful. Can you also please provide guidance on when to use Shortcuts, the functionality provided by Epi/Optimizely within the page properties in CMS

May 10, 2023 17:13
Scott Reed - May 11, 2023 8:31
Shortcuts are useful for redirects or serving the content from one page to another (however for SEO there will be duplicate content when serving from another page). You can read more here

The problem is with shortcuts is managing them as if you have a lot it's hard to centrally manage

We experienced an issue with this notfoundhandler, where we got the following error message in the log:
System.InvalidOperationException: The response cannot be cleared, it has already started sending.

The bug could not be reproduced on localhost which seemed strangely enough to be because of the VS Plugin / Feature BrowserLink, which seemed to delay the Response.HasStarted from being set to true. Deactivating BrowserLink made the error surface in localhost aswell. Turns out that there was a middleware that we used in our pipeline that caused this issue with Response.HasStarted being set to true, and we had to move the Geta not found handler and the "opti not found handler" after/below this middleware. Just writing here if anyone else runs into the same issue.
The middleware that messed things up was: app.UseStatusCodePagesWithReExecute(...), which maybe is not so strange after all since this middleware starts a new request pipeline.

Moving the notfound handlers after  app.UseStatusCodePagesWithReExecute solved our problem.

May 26, 2023 9:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.