Mobile app version of vmapp.org
Login or Join
Holmes151

: How do I create 301 redirections for changed permalinks I recently learned that the default WP permalink with post date is not SEO friendly. So I had to change the links for all 270 posts

@Holmes151

Posted in: #301Redirect #Redirects

I recently learned that the default WP permalink with post date is not SEO friendly. So I had to change the links for all 270 posts on my blog. However, the old links still display on Google search engine for over a week now.

For example, If you search for the term "Kimfly mobile phone specifications and price", this link will appear:

example.com/blog/2017/06/21/kimfly-mobile-phones-specification-price/


with a page not found message. The new link is:

example.com/blog/kimfly-mobile-phones-specification-price/.


How do I get Google to Redirect the old link to the new one until googlebot is able to display the new link in search results.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Holmes151

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

I would recommend that you make a list of all your old urls that you wish to redirect to their new ones. This is not only important to help google find its way but also to keep your old linkjuice coming from backlinks to your website. Otherwise that will be lost and you will loose rankings.
After that you should get a redirect plugin for wordpress. No need to manually manipulate your htaccess if you don't feel comfortable doibg that. Theres a plugin called redirection. Look into that one. Then point every single old url to its new url. When that is done and you have verified that it is working you go to Google Search Console and do a fetch and render and then ask google to crawl your entire website. Once that is done you can expect your serp to change faster and you will end up a lot happier :)

10% popularity Vote Up Vote Down


 

@Murray155

It is a good idea to create 301 redirects for any moved content. This lets visitors, including Google, know that the page has moved and where to find it.

Since your change follows a pattern, you can redirect the URLs with a single rule. The most simply way to do this is by modifying your .htaccess file.

In your document root, where your site's files exist, look for a file named .htaccess. You may have to enable an option to show hidden files, depending on how you are viewing your files. Somewhere near the top, probably above the WordPress block, add a couple of lines of code like this:

RewriteEngine on
RewriteRule ^/blog/([0-9]+/[0-9]+/[0-9]+/)(.+)$ /blog/ [R=301]


Assuming that you are using a standard Apache installation, that should cause your old URLs to redirect to the new URLs, so that if somebody visits the old one, their browser will update it to the new one. This assumes that all such pages have the format where the name is "/blog/" followed by three sets of digits delimited by "/", and that the set of numbers is what needs to be removed.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme