0

I deleted a post from a site and I used yoast to move the URL (error 301) to another post, now I am struggling because I want to move the deleted content to the site homepage instead of blog post.

How can I solve this? I have tried all plugging that I know.. 😏

  • Some should help. I need ur suggestions... – Chichi Feb 12 at 19:54
  • if you setup a 301 then you shouldn't get a 404. Or do you mean you actually want to take the content from the old page and add it directly in the homepage. Your questions seems to be asking for different things – RiddleMeThis Feb 12 at 19:56
  • Yes I want to redirect the old URL to my homepage instead of blog post. – Chichi Feb 12 at 20:02
  • "I used yoast to move the URL (error 301)" - Can't you edit the existing redirection you created with Yoast? However, a problem you'll face is that the previous 301 redirect will have been cached by browsers - there's not much you can do about that unfortunately. (BTW, a 301 response is not an "error" state.) – MrWhite Feb 12 at 22:04
1

You can use FTP to edit edit your .htaccess file, which should be found in the root WordPress install.

For example...

Redirect 301 /old-url /some-new-url

Put the old page first and just a / for the homepage second.

Note: Make your edits after the # END WordPress line

Note 2: There are a ton of plugins that can help with redirects but since this site is about coding I suggest the .htaccess way, which is what a plugin would do for you

| improve this answer | |
  • Oh thanks, let me check it out. – Chichi Feb 12 at 20:11
  • 1
    This solution is actually the good one. You can also manage those redirections if you have access to a control panel like cPanel or Plesk. – Patrice Poliquin Feb 12 at 20:26
  • Is /old_url the original old URL that was redirected or the target of the initial redirection that was configured in Yoast? Or both?! Why not edit/create the redirection in Yoast? – MrWhite Feb 12 at 21:59
  • I don't use yoast so I don't know about it. Sounds like OP might want to add 2 new 301 redirects into .htaccess, and remove whatever he added in yoast. I was a little confused by the wording of the question. – RiddleMeThis Feb 12 at 22:01
0

Since you use Yoast, you can change the redirect on your Yoast Redirect Manager. Edit the redirect you created on deleting your post. Replace the current destination to your homepage URL.

Note: Your current browser might have already cached your URL so the changes will not be identified on your current browser. Clear your browser cache or check it on another browser or other device. Your new redirection will reflect immediately.

You can also use .htaccess or PHP for redirection. But you already got the easy solution with Yoast Redirect manager.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.