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.
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.
Thanks for the content, you can’t imagine how much I’ve learned on this site!