So, your old blogspot domain is not redirecting automatically to the new custom domain even after every setup is complete?. Welcome!. At least, you're not alone.
Because it happened right after I started using the CloudFlare's service, I posted a thread in the community but did not receive positive feedback so I had to figure out how to solve the issue on my own.
Why is it necessary?
1. Users friendliness
Do you want to scare your readers away?. If not, you shouldn't leave it there. There's high chance that most people that come across the page on your site will not click the link to get redirected.
2. Google Crawling
This is one important thing to consider as Google will not crawl those links anymore.
How I got it Fixed
It's just a simple js file that replaces all the old domain links on every page with the new custom links.
So, here it is:
<script type='text/javascript'> $(document).ready(function() { $('a[href*="YOUR_OLD_DOMAIN"]').each(function(){ $(this).attr("href",$(this).attr("href").replace("YOUR_OLD_DOMAIN","YOUR_NEW_DOMAIN")); }); }); </script>
Procedure:
- Go to your blogger account and click Theme from the side menu.
- Click Edit HTML and place the above code in your blog template where your js files are located.
- Remember to replace YOUR_OLD_DOMAIN with your blogspot domain (e.g foxxytech.blogspot.com) and replace YOUR_NEW_DOMAIN with your custom domain (e.g www.kefblog.com.ng).
- Save your template and you're done!.
View your blog and see the changes. Viola!, every link is now working fine and you can worry no more about your audience and Google index.
Thanks for reading. Do share our articles.