Question: I'm new to Drupal and want to create a sort option (to sort some Forum topics) so that a user can select any topic and apply it.

Here is an image to better illustrate this:

![enter image description here](https://i.stack.imgur.com/IqHqr.jpg)

How to make such sort option?

Answer: 
It's really up to you what you want to do but the way I see it, if a user goes to a random non-existing path on your site they will get a 404 error, so if the rabbit hole page is a page the user should never be able to get to then it should also be a 404 error because as far as that user is concerned it is not a valid page.

Now if you redirect all 404 errors to your home page or search page or something then these pages should have the same behavior.

If the page is something that anonymous users cannot see but a paying member can (or some similar scenario), then it may make more sense to set rabbit hole to a 403 error, because it is a page that they can't currently see but could see if they log in.
Usually I would recommend a 301 redirect – if the contennt really has moved to a new location. But in this case, redirecting from various pages to the front page, a 301 would **not** be recommendable – at least **from a SEO point of view**. When a search engine reads a 301, it interpretes it as "*this content has move permanently to a new location*". But in your case that's not the case – and so I would fear that a 301 could actually fire back. The pages you basically just wanted to hide from the user will probably disappear from the search indexes one by one.

Instead I personally would probably use javascript for forwarding users to the front page. The user experience is close to a 301 redirect – but for search engines javascript is mostly not functional so that the pages you just wanted to **hide from users** can actually **stay in the search indexes**.

I haven't tried the rabbit hole module myself – but since it seems to be able to have search engines crawl, while users are redirected, at least it sounds worth trying.

ps: just saw your comment on the accepted answer: "those pages are simply not supposed to exist". Well – then it's *probably / almost* all the same.