Redirecting deleted posts 301 vs 302
-
There is a category on WP where job ads are posted. when a post got deleted I would like to pass 404 error page and redirect all those deleted posts to specific category.
I found WP plugin Auto Redirect 404 in 301 for Trashed Posts which does redirect deleted post to specific URL. But posts which are in the trash (not permanently deleted) will get 302 redirects. Those deleted permanently will get 301 redirects.
Should I try editing this plugin or find another why? Maybe there is similar way with Redirection plugin?
-
It's probably easier to only use 301 redirects, especially if the majority of deleted posts are not going to be restored and are deleted permanently in a few months.
-
Actually those posts get permanently deleted after a while (1-5 months). But as I said before, some of them get deleted and then they need to be reposted again before they will get permanently deleted.
-
Then a 302 would be more appropriate as it is a temporary redirect. It sounds like you need to work on some of your publishing operations/procedures. Ideally, once you publish a post, it stays up etc. You need to figure out how you can improve the process so that you minimize getting into the situation to start with.
If you need to, I would delay the posting to start with if that would ensure that once it posts, it stays up on the site etc.
Good luck.
-
I don't own that site but the owner of the site needs post to be kept in the trash because those posts often have to be restored.
-
You need the 301 redirects. 302 redirects give me ulcers. Is there any reason you are keeping things in the trash? If you really need to save something for later, putting it in the trash is probably not your best option. If you need to permanently delete them - then go ahead. If you need the trash option for storage, then you probably need another plugin.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Solve Redirect Chains
I've gotten a few Redirect Issues that involve Redirect Chains, with the https:// version redirecting to the www. version and then redirecting to the right URL. Here is an example:
On-Page Optimization | | Billywig
Schermafbeelding 2021-12-07 om 11.04.32.png I've tried setting a direct redirect between the first and the last URL, but WordPress doesn't seem to allow that (it's overwritten). I've also tried checking the internal links to make sure that none of the links are the first one. They don't seem to be there. Does anyone have any tips on solving these Redirect Chains?0 -
Should I add canonical links to pages that are redirected?
Hello! I am a little confused concerning canonical links. I have several URLs that all access my page, but I redirect them all. A lot of places I am told to redirect them or use canonicals. Other places, I read that I should always use canonicals. What is the right way for me? If I should use canonicals as well as redirects, which links should I do this on? I redirect my pages like this: http to https:
On-Page Optimization | | hermanok
http://example.com -> https://example.com www to non-www:
https://www.example.com -> https://example.com Remove trailing slashes
https://example.com/ -> https://example.com Would-be 404-requests to index.php?p=$1
https://example.com/home -> https://example.com/index.php?p=home ( show as https://example.com/home ) Example:
http://www.example.com/home/ -> http://www.example.com/home/ -> https://example.com/home/ -> https://example.com/home -> https://example.com/index.php?p=home ( shows as https://example.com/home ) Thank you!0 -
Should I spend time going back and optimizing old blog posts for SEO or just write new posts?
The site I manage (Boutique Estate Law Firm) has at least 350 old blog post archived that were not well optimized for SEO. Would it be valuable to go through and optimize those old posts or just write new optimized posts even though they are on the same subjects? My boss loves to churn out 300 word posts.
On-Page Optimization | | SEO4leagalPA0 -
No-index or 301 - custom wordpress archives
Hi, We are using custom wordpresss posts to showcase different services we provide, these are then grouped within custom archives. These custom archive pages are our main keyword landing pages and traffic generators (although ranking is fairly average). It's come to my attention that these custom posts have also been listed in the wordpress standard categories, with an identical title, excerpts and near identical urls as the custom archives. This appears to have been the case for quite a while. We are concerned that this is may causing duplicate content issues and unsure how to proceed. We have been advised to simply no-index the redundant 'standard' categories but as they have been indexed for some time we are cautious of causing any upset with search engines (although the categories are indexed they are not ranking for any major keywords) Are we best 301ing the redundant category to the custom archives or using a canonical tags or simply no-indexing the categories like other archive pages? Any advice is aprreciated Many thanks BC
On-Page Optimization | | benct0 -
Redirect Code Needed.
Hi, Please help me redirect the following pages in htaccess. https://www.mydomain.com/FolderA/FolderB/number-of-pages.html to **https://www.mydomain.com/FolderA/FolderC/FolderB/number-of-pages.html ** I want to redirect atleast 50 pages like this. Please help Thanks
On-Page Optimization | | Kashif-Amin0 -
Apache .htaccess query string redirects
With regular redirect(s) the following URLs did not work, any ideas for the .htaccess code to make this work? http://www.domain.com/?view=featured redirect to http://www.domain.com/ http://www.domain.com/contact-us.html?view=message&layout=message&pf=1&redirect_on_success= to http://www.domain.com/contact-us.html and http://www.domain.com/login.html?return=aW5kZXgucGhwP29wdGlvbj1jb21fcGhvY2Fkb3dubG9hZCZ2aWV3PWNhdGVnb3J5JmlkPTEyOmNvbWJpbmUtZXZhbHVhdGlvbiZJdGVtaWQ9NzM4 to http://www.domain.com/login.htm Thanks guys! 🙂
On-Page Optimization | | vmialik0 -
Page authority still on 1 after url change and 301 redirect
Hi Moz analytics suggestion to help ranking is to have a keyword or phrase in the url so I advised a client to do this they changed one of their pages urls, this page previously had a page authority of 26 since the change its gone down to 1.
On-Page Optimization | | genkee
I advised them that they must do a 301 from the old page but they took a few weeks to do this, would this of affected it why is it not showing up yet its been 3 weeks now, since the 301 and 5 weeks since the url change.0