Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Redirect Google Blogger Local Domains to World Wide .com Domain
<!-- This code will redirect any Blogger local domain such as to the world wide domain -->
<!-- Just paste this code before <head> tag -->
<!-- Start of the code -->
<script type='text/javascript'>
var blog = document.location.hostname;var slug = document.location.pathname;var ctld = blog.substr(blog.lastIndexOf(&quot;.&quot;));if (ctld != &quot;.com&quot;) {var ncr = &quot;http://&quot; + blog.substr(0, blog.indexOf(&quot;.&quot;));ncr += &quot;; + slug;window.location.replace(ncr);}</script>
<!-- End of the code -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.