Welcome to WebmasterWorld Guest from 34.236.170.48

Forum Moderators: rogerd & travelin cat

Auto-redirect to category

     
12:26 pm on Mar 30, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 30, 2007
posts: 690
votes: 6


Anyone any suggestions on how to do this - I think it should be possible via htaccess.

With a large number of events coming and going throughout the year, and these getting indexed... as and when they pass and get automatically deleted (via woocommerce) is it possible to automatically redirect any 404 deleted post/product to its category?

ie categoryapples/postname - >>> gets deleted categoryapples/deletedpostname >>> 404 >>> any visitors REDIRECTED to categoryappples/
1:46 pm on Mar 30, 2019 (gmt 0)

Preferred Member from CA 

Top Contributors Of The Month

joined:Feb 7, 2017
posts:570
votes: 56


I have not heard of this, but would be interested to learning how to do this. Usually deleted WP pages get a themed 404 page.
1:53 pm on Mar 30, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4458
votes: 331


Most themes (afaik) allow you to customize a 404.php so that you could easily add in a prominent section suggesting the categories along with the links.

Why is that preferable to an automatic redirect? Because redirecting to a page that does not have the content listed in serps and is not a 404 is viewed by Google as a soft 404. Google doesn't like soft 404s, sees it as a poor user experience.
1:54 pm on Mar 30, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 30, 2007
posts: 690
votes: 6


I am not sure how search engines deal with this - my guess is that the urls just drop off... perhaps an 'optimised' 404 page would be a better option... but in this case, the actual category would equally seem a fair option.
2:08 pm on Mar 30, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 30, 2007
posts: 690
votes: 6


Thanks Not2easy - I posted my comment as you must have been in the middle of posting yours...
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members