V
V
Valery2016-08-24 14:12:51
Search Engine Optimization
Valery, 2016-08-24 14:12:51

How to SEO-correctly rename an article in WordPress?

The question is simple, but I did not find intelligible answers. There is a blog with articles on it.
I looked at Analytics - I would like to rename many articles. But after all, all pages have long been indexed by both Google and Yandex. Renaming is easy, but the links will go to 404.
How to notify search engines that the pages have been renamed, and not a new one, etc. Or just use a level redirect like htaccess. In this case, I will be grateful for an example from life.
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel, 2016-08-24
@Palych_tw

WordPress itself places a 301 redirect to a new url. Especially if you just change the title of the page, the URL will not change, it also needs to be changed manually.

V
Vitaliy Orlov, 2016-08-24
@orlov0562

There are a lot of options:
1) register the necessary changes (redirect) manually in htaccess (bad option)
2) write or find a plugin that will add the necessary redirect rules (correct option)
3) to the post whose url has changed, add additional. field with old url. In the theme folder in the 404.php file, check the requested url for existence in the add. the posts field and in case of a match, redirect to the desired url, and if there are no matches, show 404 (simple option). Example (without searching in additional fields):

if ($_SERVER['REQUEST_URI'] == '/old-post-url.html') {
   header("HTTP/1.1 301 Moved Permanently");
   header("Location: /new-post-url.html");
   exit;
}
...
// остальной код страницы 404

A
Alexander Chernykh, 2016-08-25
@sashkets

VI has a Redirection plugin. This is in case you change addresses.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question