Use 301 Redirect In Google Blogger/Blogspot
Asked Answered
S

3

8

I have a Google Blogger blog where I blog. Sometime ago, I posted a post but now after getting new data, I updated that post and I got new URL of that post. But I have a lot of backlinks to that old URL and now when they are htiing then they are getting 404 page that is a bad SEO. Now I want to use 301 Redirect to redirect old URL to new URL.

For this purpose, I know that we have to use .htaccess and add Redirect 301 OLD_POST_URL NEW_POST_URL but Google Blogger doesn't offer to edit .htaccess so How to do this there?

Slav answered 17/7, 2014 at 5:24 Comment(0)
G
8

Yes, Google Blogger does not offer you to edit .htaccess file but they just released an option to use Custom 301 Redirects. From this featurs, you can do what you want. Just follow the below step to use this features.

  1. Go To Your Desired "Blog" Dashboard.
  2. Go To "Setting".
  3. Go To "Search prefences".
  4. Click "Edit" On Custom Redirects ? no items Edit
  5. Now Add Your Desired Old Post URL In "From" Input Section And Your URL Should Be Like /YEAR/MONTH/POST-TITLE.html
  6. Now Add Your Desired New Post URL In "To" Input Section And Your URL Should Be Like /YEAR/MONTH/POST-TITLE.html
  7. Check "Permanent" Option.
  8. Click "Save".
  9. Then Click "Save Changes".

I added a screenshoot below to understand completely.

enter image description here

Garvey answered 17/7, 2014 at 5:25 Comment(1)
This effects the entire blog? Can you set up these redirects on a per-post basis?Crippen
P
1

There is another solution for site based redirection using javascript. I've done this after changing my blogger subdomain and it works. Go to Settings -> Search Preferences and find the section Custom Page Not Found and click edit next to it. Enter a code similar to the following to redirect your old pages to your new web site:

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

Change urls and save. You can use this method to redirect to other domains too. This is the custom 404 page of your old site so your old blog must return 404 for the urls you want to redirect.

Proportioned answered 20/4, 2015 at 8:46 Comment(7)
Using any kind of javascript redirect will get the blog removed for spam sooner or later. Same thing if you use meta refresh.Lyckman
i dont think that it matters if the old site will not be used anymore.Proportioned
I am trying this approach, except I put the script into the body of the theme. Seems to work for now, and hopefully long enough for the search engines to have transferred the page rank to the new URLs. By the way, just as an FYI, I noticed that that script does send a 301 back to the browser.Porosity
@Porosity This is just a client redirect and not based on bot redirection with header redirect code. Normally when you have server access it is better to make 301 redirect but i don't know if this is possible with js, worth researching if possible or not.Proportioned
@eren I stand corrected - using JavaScript on the page to customize the client side content redirect does not send a 301 header back from the server. I think I read somewhere that some browsers - Chrome and Firefox - are somehow processing certain redirects as though they are 301s. IIRC the dev tools were showing 301s in the network traces after hitting these pages. Is this possible?Porosity
@Porosity I'm not sure if its possible but 301 header is only important for search engines as i know and they (ie. google) may possible browse as client and check 301 header if there is a way of adding header code to redirect process with js. However i don't know if this is possible with js.Proportioned
@eren, having knowledge in web development - I am confident I am correct that 301 can only be generated from the server side. What I had meant to clarify is that it appears to me that Google's Chrome browser emulates a 301- as in how DevTools' network tracing feature shows a 301. Since the JavaScript runs in browser, it cannot generate a 301. My understanding might be further complicated by the fact that I think browsers try to remember 301s, and go directly to the new location - skipping repeated trips to the old location, followed by the 301, etc.Porosity
S
1

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

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

(Source)

Slackjawed answered 20/12, 2016 at 11:7 Comment(1)
I have since learned that it is beneficial to SEO to use the link rel=canonical - which I have implemented in my case.Porosity

© 2022 - 2024 — McMap. All rights reserved.