Use 301 Redirect In Google Blogger/Blogspot

前端 未结 3 1983
甜味超标
甜味超标 2020-12-18 00:45

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

相关标签:
3条回答
  • 2020-12-18 00:45

    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)

    0 讨论(0)
  • 2020-12-18 00:48

    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

    0 讨论(0)
  • 2020-12-18 01:09

    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.

    0 讨论(0)
提交回复
热议问题