BloggerWordPress

Config the Blogger blog Redirection to WordPress with NGINX server

Redirection of blogger blog to a WordPress site with NGINX web server.

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

Note this article is for the advance users, and only for those who are using 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" /$3/ redirect;
rewrite "/p/(.*).html" /$1/ redirect;
if ($query_string ~ "^m=1$"){
    rewrite ^(.*)$ $1? redirect;
  }


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

This configuration contain.

  • 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 setting is for NGINX server only.

Ashok Kumar

Love Coding, Love Blogging what else to explain :).

Related Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button