Use 301 Redirects to Google Blogger / Blogspot

I have a Google Blogger blog where I host a blog. Once I published a post, but now, after receiving new data, I updated this post and I have a new URL for this post. But I have many backlinks to this old url, and now that they become htiing, they get 404 pages, which is bad SEO. Now I want to use 301 Redirect to redirect the old URL to the new URL.

For this purpose, I know that we should use .htaccess and add Redirect 301 OLD_POST_URL NEW_POST_URL , but Google Blogger does not offer to edit .htaccess like that. How to do it?

+6
source share
3 answers

Yes, Google Blogger does not offer you to edit the .htaccess file, but they just released the use case for Custom 301 Redirects . From this you can do what you want. To use these features, complete the next step.

  • Go to your Blog panel.
  • Go to "Settings".
  • Go to the Prevention Prevention section.
  • Click "Edit." Custom Redirects ? no items Edit
  • Now add your desired old URL in the From section and the URL should be like /YEAR/MONTH/POST-TITLE.html
  • Now add your desired new URL to the To field and your URL should be like /YEAR/MONTH/POST-TITLE.html
  • Check the "Permanent" box.
  • Click "Save."
  • Then click "Save Changes."

I added a screenshot below to fully understand.

enter image description here

+5
source

There is another solution for site based redirects using javascript. I did this after changing my blogger subdomain, and it works. Go to Settings → Search settings and find the section Custom page not found and click change next to it. Enter code similar to the following to redirect old pages to the new website:

 <script> var url = location.href; var newurl = url.replace('oldblog.blogspot.com','newblog.blogspot.com'); location.href = newurl; </script> 

Change the urls and save. You can also use this method to redirect to other domains. This is the regular 404 page of your old site, so your old blog should return 404 for the URLs you want to redirect.

+1
source

If server-side redirection is not supported, you can use the canonical meta tag in the <head> section of HTML:

 <link rel="canonical" href="http://example.com/some-page-123" /> 

( Source )

0
source

Source: https://habr.com/ru/post/972363/


All Articles