1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to do a java script redirect

Discussion in 'Black Hat SEO' started by redballlizard, Jan 12, 2017.

  1. redballlizard

    redballlizard Junior Member

    Joined:
    Jun 11, 2016
    Messages:
    175
    Likes Received:
    1
    I want to do a redirect that reads the page in the google cache but redirects to a landing page. I think java script can do that but I can't seem to find the javascript code to put in the index.html to make this work.
     
  2. hvp17

    hvp17 Regular Member

    Joined:
    Aug 2, 2012
    Messages:
    494
    Likes Received:
    546
    Gender:
    Male
    Occupation:
    Web Dev
    Location:
    Freelancer
    Why don't you use html?
    Code:
    <meta http-equiv="refresh" content="0;http://anotherdomain.com">
    
    Or if you really need javascript:

    Code:
    <script language=javascript>
    function redirect(){
      window.location = "http://REDIRECTURL.com";
    }
    </script>
    
    <body onload="redirect()">
    
    </body>
    
     
  3. redballlizard

    redballlizard Junior Member

    Joined:
    Jun 11, 2016
    Messages:
    175
    Likes Received:
    1
    thanks man html may cache both sites. I want the main site to be cached
     
  4. Fault.Injection

    Fault.Injection Newbie

    Joined:
    Oct 3, 2016
    Messages:
    3
    Likes Received:
    0
    Gender:
    Male
    use a javascript Obfuscator
    i want to put a link but i cant use google for it ^^
     
  5. redballlizard

    redballlizard Junior Member

    Joined:
    Jun 11, 2016
    Messages:
    175
    Likes Received:
    1
    I was going to redirect it to the landing page for the niche im targeting thinking that the landing page has the highest conversion rate is that the wrong way to look at it?
     
  6. Fault.Injection

    Fault.Injection Newbie

    Joined:
    Oct 3, 2016
    Messages:
    3
    Likes Received:
    0
    Gender:
    Male
    that what i understood from you message
    You want to encrypt your code javascript i will show you how

    this page will redirect youto google after 3 Sec
    <html>
    <head>
    <script>
    function gotoX(){
    window.location = "www[dot]google[dot]com";
    }

    setInterval(gotoX, 3000);
    </script>
    </head>
    <body>
    </body>
    </html>

    Now lets encrypt our code
    you can use javascriptobfuscator[dot]com
    put the js code then click on obfuscate button copy the result to your page html
    it's will be like this

    <html>
    <head>
    <script>
    var _0x89de=["\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D"];function gotoX(){window[_0x89de[0]]= _0x89de[1]}setInterval(gotoX,3000)
    </script>
    </head>
    <body>
    </body>
    </html>

    Sorry for my bad english ;)