Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
638 views
in Q2A Core by
edited by

Hey webmasters!

I want to redirect all my "Page not found" to homepage.

My domain have a lots of backlinks of a page which doesn't exist now on website. It show "Page not found".

I have tried this in .htaccess:

ErrorDocument 404 /index.php

Example:

1.) There are a lot of backlinks of this page. Now this page doesn't exist on my website now.

There are a lot of pages like this which show "page not found".

I want to redirect all "page not found" to my Website homepage.

Q2A version: 1.8.5
by
Assuming that you're running Apache and have "AllowOverride All" set in your config that .htaccess should do what you want.
Did you restart your webserver? What do your webserver logs say about the request? Also, I saw that you seem to be using Cloudflare. Does it work if you send a request directly to your webserver?
by
+1

Hello @kk3575515,

I want to redirect all my "Page not found" to homepage.

I’ve read these three articles about 404 error pages and SEO impacts:

And none of them recommends turning all 404 responses into 301 redirects. In fact, how did you get to know about the broken link in the first place? Answer: because it appeared in server’s error log several times or it somehow appeared in Google Search Console. If all 404 response pages were redirected then you wouldn’t know what problem to solve.

The process of Identifying and redirecting these broken links for regaining lost link value is what Kara Eccleston's article calls backlink reclamation. It also talks about when it should be done:

If the 404 page has earned quality backlinks or is receiving a significant volume of traffic, the page should be 301 redirected to the page that is most relevant or that best serves the users intent. If the page is not receiving traffic or links, it’s ok to let it 404.

In your particular case,

There are a lot of pages like this which show "page not found".

According to Tory Gray's article, you need to prioritize which one are more relevant: those that impact real people, that have high quality external links, that have high quantity external links, that crawlers keep checking; and then redirect those high priority links.

Please log in or register to answer this question.

...