how to blogger website redirect url xml code

How to blogger website redirect URL XML code


how to blogger website redirect url xml code



To set up URL redirects in a Blogger website, you can use the custom XML template. This will enable you to redirect visitors from one URL to another. Here's a step-by-step guide on how to do it:

Accessing the Blogger Template: Go to your Blogger dashboard and select the blog you want to work on.
Navigate to "Theme" or "Theme" > "Edit HTML." This is where you can customize the template.


Backup your Template (optional but recommended): Before making any changes, it's a good idea to back up your current template in case anything goes wrong.
Click on the "Download Theme" button to save a copy of the template to your computer.


Adding the Redirects in the Template: Look for the opening <b:skin> tag in the template code. This is usually found at the beginning of the code.


Add the following code below the <b:skin> tag to create a custom redirection XML code:
  1. <b:redirect from='[OLD_URL]' to='[NEW_URL]' />

Replace [OLD_URL] with the URL you want to redirect from, and [NEW_URL] with the URL you want to redirect to. For example:

<b:redirect from='http://example.com/old-page' to='http://example.com/new-page' />



  • You can add multiple redirect rules by repeating the <b:redirect> tag for each redirection.
  1. Save the Template:

    • After adding the redirect code, click on the "Save theme" or "Save" button to apply the changes to your Blogger template.
  2. Testing the Redirects:

    • Open your browser and enter the old URL you specified in the from attribute (e.g., https://mddulalhosen6.blogspot.com/).
    • The page should automatically redirect to the new URL you specified in the to attribute (e.g., https://mddulalhosen6.blogspot.com).

Please note that once you set up URL redirects, they are automatically applied and do not require any further action from you.

Remember, working with the template can be risky, and any incorrect modification may break your blog. Be careful while editing the template, and always keep a backup in case you need to revert to the previous version.

If you encounter any issues or errors, you can restore your template from the backup you created earlier.






*

Post a Comment (0)
Previous Post Next Post