How to Prevent Redirection Code in Blogger Template?
What is redirection?
If you create a blog in
blogger.com then you can see that out site visitors see your website not in .com
but it redirected .in, .it like that. Suppose an Indian visitor looks as example.blogspot.in
and from ltali is example.blogspot.it. Because google redirect your web site into
local domain.
You can prevent with the help of
a small code. But note that your website loading time increases slightly like
1-2 second more. In our site of your country website redirect to .com, it will
take time little bit [where is local domain]
Why you prevent redirection in blogger template?
* Google takes some facilities
from the local domain, but you don’t have nothing.
* Your ranking will be falling
down if you use local domain. Like Alexa ranking. Because Alexa could not count
separately. And it will hamper your Facebook like or twitter like may be.
How to solve Redirection?
Log in your blogger site
Go to Template => Edit
HTML
Now click on HTML code once and
press Ctrl+F
You can find a search box, type <head>
Now paste the below code after <head>
<script
type='text/javascript'>
var blog =
document.location.hostname;
var slug =
document.location.pathname;
var ctld =
blog.substr(blog.lastIndexOf("."));
if (ctld !=
".com") {
var ncr =
"http://" + blog.substr(0,
blog.indexOf("."));
ncr +=
".blogspot.com/ncr" + slug;
window.location.replace(ncr);
}
</script>
|
You can take the help of below
image
Your task is finished. Save your
template and go to the browser. Type your blog site url with .in, .it instead
of .com. It will redirect you into .com
How to Prevent Redirection Code in Blogger Template?
Reviewed by Totana
on
01:20
Rating:

No comments: