Your Blogspot Redirecting to .ng and Ads Not Showing On Desktop? Try This..


Blogger Nnadi Nnaemeka Donatus contacted me few days back to complain that Google ads generated from his hosted Google Adsense account are no longer displaying on the desktop view of his blogspot blog.


I checked his blog and discovered that the ads were ONLY showing on mobile view. I also noticed that his blog keeps redirecting to .blogspot.com.ng. Before I could figure out what's wrong, he sent me another message that the problem has been fixed.

So how?

Copy and paste the code below to the head section of your blog's html. It will stop the redirection and ads will display on the desktop view.

<script type="text/javascript">
var blog = document.location.hostname.split(".");
if (blog[blog.length - 1] != "com") {
var ncr = "http://" + blog[0] + ".blogspot.com/ncr";
window.location.replace(ncr + document.location.pathname);
}
</script>



Don't know where to add the code?

==> Sign in to your Blogspot dashboard
==> Go to "Template" > "Edit HTML"
==> Click inside the html
==> Press CTRL F on your keyboard to find <head> or </head>



==> Copy the code directly below <head> or  above </head>
==> Click "Save Template"

View your blog and you should see the Google ads.

I hope it works for you.

Thanks to Nnadi Nnaemeka Donatus for sharing this.

Below is a video tutorial that will guide you :

https://youtu.be/lPWoRK1b5zQ




NB: Ensure the code you pasted in your blog's html appear exactly as the code in this tutorial, If a strange - or .  appears in the code before javacript, in between pathname, hostname and replace, delete them. If not this code won't work for you.


Have fun!



Comments

Simi said…
It worked. You're a life saver boss. God bless you loads..
Amebo Guy said…
Its not working here sir
Amebo Guy said…
Working Perfectly Sir....Found My Mistake..Thanks Sir.
Gist Arena said…
I have tried it and its not working for me, what else should i do Oga jide
Godwin Okon said…
Oga jide it is not working for me oh.. It still redirects me to .com.ng
Godwin Okon said…
Oga jide your on top i done it now working. i Salute u infact from 2day am now ur fan
Celebrity Habit said…
Pls how did you guys do yours, i have tried the way he wrote but not working still
Kenneth Nwafor said…
Been following your blog for sometime now...u are good at what you do bro, thanks for all tutorials..

Meanwhile ...Catch up with Latest from Entertainment News and Celebrity Gossip at:
www.kennwaforsblog.com
Don Pafegs said…
Thanks for sharing Jide

REAVEALED!!!   5 Sexual Acts That May Cause Cancer
Efukikata Efet said…
I think you need to parse the script first
Efukikata Efet said…
Exactly @Celebrity Gossip. Parse it first here http://www.blogcrowds.com/resources/parse_html.php and it will work.

It works here http://9ja-gist.blogspot.com/
Efukikata Efet said…
Exactly @Celebrity Gossip. Parse it first here http://www.blogcrowds.com/resources/parse_html.php and it will work.

It worked here http://9ja-gist.blogspot.com/
corper said…
pls it is not working here. i used the real code an the parse one but i still have .com.ng. pls someone should help me out
corper said…
pls it is not working here. i used the real code an the parse one but i still have .com.ng. pls someone should help me out
Celebrity Habit said…
Bros i have done it and its still giving me code error.
corper said…
i parse the code and as well used the code directly but yet it is not working.
Nnadi Donatus said…
Nice one Baba Jide..
Jide Ogunsanya said…
Glad it worked for you.
Jide Ogunsanya said…
@Amebo ...mind sharing the mistake so others can learn from you?
Jide Ogunsanya said…
lol..anytime bro. Glad to know it is now working for you. Have fun bro!
Jide Ogunsanya said…
I should thank you more. God bless you bro.
Jide Ogunsanya said…
You are probably not doing something right. Ensure you paste the right code below <head> or above </head>
Jide Ogunsanya said…
You're welcome bro. Thanks for following...
Jide Ogunsanya said…
Thanks for the appreciation.
Jide Ogunsanya said…
Am surprised it's not working for you and working for others. Pls ensure you copy the right code and paste it below <head> or above </head>
Amebo Guy said…
Guys, if u copy and paste...it myt not work.
Recheck the script well.
Gist Arena said…
Jide yes, i tried both tags but still did not work.
Jide Ogunsanya said…
Something is wrong at your end. Create a test blog using a default Blogger template and try this code on it to see if it won't STOP the redirection. You should also trying using another browser...
George Emmanuel said…
I encountered this problem some months ago then i use the code above and it worked one hand. For those that it did not work for, just change your template and apply it again.
Anonymous said…
Any body having that issue...? if you are using mtn simple server to blog..change to a normal subscirbed sim and check your blog will stop rdireting...
Gist Arena said…
Oga Jide thank you so much for this post. finally its .ng is not showing on my blog again. i had to source for another code
Thank so much boss. God Will bless you the more
Ben said…
@Amebo. Please be specific, what is it that you did that made it work? What should I recheck? It is not working from my end.

Please paste your corrected script.

Thanks
Memodreal said…
I just put my youtube adsense on my blog , butt it shows blank. I applied what's above now it doesn't redirect to .ng but still showing blank. Is it because i just palced youtube adsense on the blog , Does it take a while before your youtube adsense start to show on blogspot ?
Jide Ogunsanya said…
Glad it's now working. Are you also using MTN simper server to surf the net?
Jide Ogunsanya said…
What is your blog URL?
Gist pluz said…
oga Jide.. does youtube adsense Display Ads on .blogspo.comt domain?
Efukikata Efet said…
No more redirecting issues on adsense hosted accounts. Google Nigeria have fixed the issues for us. I just tried it with my blog http://efukikata.blogspot.com.ng. Am currently using a google hosted account. All same kudos to Jide for helping us.

What do u think went wrong then that the ads were not showing?
Please oga jide, I need a better template for my site www.temmyguru.com
Can you please send a template to my email temidayoorimisan@gmail.com
Thanks.
Jide Ogunsanya said…
@All...if not working for you, ensure you delete the - if it appears in your copied code before the word "javascript", and in between the words "replace" and "pathname".
Adeboye Adeoye said…
This comment has been removed by the author.
Emmanuel said…
Thanks it worked wonders after a single try on my new blog on my new blog
List of Reasons said…
Oga Jide, it worked like charm. My blog is now a clean .com site. Thanks a million.
thanks. it worked