Cara Mengubah Blogspot.Co.Id tetap Blogspot.Com

Tulisan ini telat di buat mengingat redirect Blogspot.Com ke Blogspot.Co.Id telah lama dilakukan.

Saya baru menyadari ketika blog ini dialihkan dari Http ke Https. Lagi pula, tidak ada salahnya menambahkan artikel terbaru di blog.

Selain bagus buat Ranking blog, tentu saja sebagai pelengkap artikel yang ada di dalam blog ini.

Silahkan klik disini bagi yang belum tahu tentang Redirect halaman Blogspot.Com menjadi Blogspot.Co.Id (mengikuti sebuah negara).

Cara Mengubah Blogspot.Co.Id ke Blogspot.Com


Untuk mencegah dan mengatasi Blogspot.Com beralih ke Blogspot.Co.id ialah dengan cara memasang kode di bawah ini, di dalam template blog:

Cara Mengubah Blogspot.Co.Id tetap Blogspot.Com

<script type="text/javascript">
/* Get the full URL of the current blogger page */var blog = document.location.href.toLowerCase();
/* Do not redirect if the domain is .com already */ if (!blog.match(/\.blogspot\.com/)) {
/* Replace the country TLD with .com and ncr switch */ blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");
/* Redirect to the new .com URL in the current tab */ window.location.replace(blog);
}
</script>

Atau dengan kode di bawah ini; tanpa keterangan di dalam kodenya:

<script type="text/javascript">
var blog = document.location.href.toLowerCase();
if (!blog.match(/\.blogspot\.com/)) {
blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");
window.location.replace(blog);
}
</script>

Jangan lupa, pasang kode jQuery di bawah ini agar tutorial di atas bekerja dengan baik.

<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js' type='text/javascript'/>

Atau Anda juga bisa menggnakan kode di bawah ini:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

Cara pasangnya, letakkan kode di atas, di bawah kode <head> di template; sedangkan untuk jQuerynya, lokasinya tepat di atas </head>.

Namun, sebaiknya sih jangan di pasang dulu. Coba cek, apakah tutorial mencegah redirect Blogspot.Com ke Blogspot.Co.ID berhasil dilakukan atau tidak.

Kalau berhasil, berarti, jQuery tidak perlu dipasang di dalam blogger templates. Begitu juga, sebaliknya.

Itulah tutorial cara agar blog tetap di domain URL Blogspot.Com, bukan lagi menjadi Blogspot.Co.ID mengikuti domain negara Indonesia.
Share To:

Arief Ghozaly

Post A Comment:

0 comments so far,add yours