BloggerWordPress

Config the Blogger blog Redirection to WordPress with NGINX server

Redirection config 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.

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 site would be like this to forward all m=1 blogger pages to clean URL.

rewrite "/([0-9]{4})/([0-9]{2})/(.*).html" /$3/ redirect;
rewrite "/p/(.*).html" /$1/ redirect;
if ($query_string ~ "^m=1$"){
    rewrite ^(.*)$ $1? redirect;
  }

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.

Please note this setting is for NGINX server only.

Related Articles

Leave a Reply

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

Back to top button