Blogger

Redirect Blogger blog URLs to WordPress with NGINX server

How to redirect or fix Blogger blog URL for WordPress.

When you move your Blogger website to WordPress, you may choose Apache or NGINX servers. If you go with the NGINX server, you face to config your blog to the server.

Note this article is for advanced users and only for those using the NGINX server only.

Blogger to WordPress NGINX server
Blogger to WordPress NGINX server

This article helps you to understand what configuration can be made after successfully transferring your Blogger to WordPress. Here we’re talking about the Blogger with a custom domain name. And the same domain you like to choose for your WordPress.

NGINX config for the site would be like this to forward all m=1 Blogger pages to a clean URL.

server {

    listen    443 ssl http2;
    root   ".../wordpress/htdocs";
    server_name  wordpress.example.com www.wordpress.example.com;

#paste the below file in server block
rewrite "/([0-9]{4})/([0-9]{2})/(.*).html" /\/ redirect;
rewrite "/p/(.*).html" /\/ redirect;
if ($query_string ~ "^m=1$"){
    rewrite ^(.*)$ $1? redirect;
  }


    ssl_certificate      "/../server.crt";
    ssl_certificate_key  "/../server.key";

This configuration contains.

  • Remove m=1 used for Blogger and redirect to a clean URL of WordPress.
  • Remove /p/ and redirect to clean.
  • Remove year and month from URL and redirect to https://sitename.com/post-name URL.
  • Remove .html and redirect to a clean URL.

This means your all Blogger page will successfully redirect to your new WordPress site.

This will redirect your website with header response code 301(permanent redirect) so that Google or other search engines can understand that blog is permanently move to WordPress CMS. And rank it accordingly.

Please note this set is for the NGINX server only. Learn How to set up WordPress on Google Cloud using Bitnami Nginx.

Ashok Sihmar

Ashok Kumar working in the Search Engine Optimization field since 2015. And worked on many successful projects since then. He shares the real-life experience of best SEO practices with his followers on seoneurons.com. You also can learn Advance level SEO for WordPress, Blogger, or any other blogging platform. Stay tuned.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button