Home >> Internet >> Redirect User to Different Domain without Loosing Website Traffic

Redirect User to Different Domain without Loosing Website Traffic


Recently, I have changed my Blog address. Due to this, I have to face a lot of Traffic Loss.

My situation was, I have a Blogger blog and a domain. A lot of Links have been shared and If I change the Blog address and create a Permanent Redirect by changing DNS, but existing Bookmarks and Shared Links will not load properly. So, I kept the Existing Domain running and created a New Blog. Exported Template and Blog, Uploaded both to New Domain and just keep both domain running up. Now I have to redirect all visitors to Previous Domain to New Domain. So that website traffic coming from shared links should be alive and must work.

Here I came with a solution.

I have created a Simple JavaScript function.


1. windows.location – This will set the Location of Window (i.e. Address of Browser.)
2. “//www.pyarb.com” – This is your New Domain. Where you have kept all File structure same. Means Links are same for All files except Domain Name.
3. windows.location.pathname – This will get the Path of Window Location (i.e. Address of Browser except Domain Name.)

Then Executed this function on PageLoad event.

That’s It. Your location remains same.

+John Bhatt 


About John Bhatt

Aka, Prithvi Raj Bhatt, A Proud Nepali, Blogger, Software Developer, ASP.NET, Web Designer & Developer, Faculty and a Troubleshooter blog @PRsBlog

Check Also


Manage DNS Records of .np domain for Free

Hi, This is a special article written in request from a friend from Nepal. This …

Leave a Reply

Your email address will not be published. Required fields are marked *