I don't want 404 to go to main page anymore
-
Hello,
In the past my site used to be an ecommerce site, now is a blog.
I used to have tons of links directly to products inside my site.
Because wp is sending all 404 errors to main page, google indexed hundreds of my old links as separate pages and all of them are identically, creating for my a huge duplicate content problem.
My wp site is using these type of permalinks : /%postname%/Please advice how should I proceed to force wp to send these links to a 404 page instead of main page.
I tried so far without success the following :1) .htaccess
ErrorDocument 404 /404.html2) I’ve placed this code in header.php of my theme
if ( is_404() ) { wp_redirect( '404.html' ); exit; }
Please help me to fix this problem, my site has been devaluated because of that.
- The topic ‘I don't want 404 to go to main page anymore’ is closed to new replies.