Recently we were going crazy when noticed hundreds of spam referral traffic to one our sites. Google Analytics report was consistent for hours showing the same traffic from a single referral site. We are using SiteGround Cloud hosting for past 6+ years on Google Cloud platform. They offer SG Security plugin which comes preinstalled when you install WordPress from their Site Tools section. The plugin’s activity log and the server’s access log shown nothing suspicious before finally we found that there is a one-click offline mode available in SiteGround. So, here is how to use offline mode in SiteGround to take your site down whenever needed.
Other Options Before You Try Offline Mode
Taking the site down is the last action you should consider as it will cause inconvenience for real users. First make sure to check your traffic is spam. Sometimes you may get a spike in traffic due to Google Search algorithm update or one of your pages might get more visibility during certain time. In our case the traffic was from referral source called “dailytraffic.shop”. This is 100% suspicious as the domain itself redirecting to another domain. Once you are sure the traffic is spam, here are some of the actions you can consider before taking the site offline.
- Disable caching plugins like WP Rocket. When you have WP Rocket, SiteGround server and SG Security plugin will not record the hit to home page. Even though you can see other pages, the statistics will not be correct. I have checked this with SiteGround support guys and you can find this from the weekly report you will be receiving from SG Security plugin. After that go to “SG Security > Activity Log” section and check the live traffic log. If you find any suspicious IP, click on the three dots against the IP address and select “Manage IP Traffic” to block it. You can also select “View Activity” option to check the details from that particular IP address.
- If it did not help, check the server log from Site Tools section under “Statistics > Access Log”. If you are able to read and understand the log, find the IP address accessing your pages. Go to “Security > Blocked IPs” section and block the IP addresses.
- In case, if you have registration feature, go to “SG Security > Post-hack Actions” and click “Log Out All Users” button.
- Setup a maintenance mode using a plugin and check the spam traffic is stopped. Remember, maintenance mode will not take your site offline though most of the spam traffic will stop with this.
If nothing helps then proceed to set offline mode for your site.
How to Set Your Site Offline and Online?
When you are in SiteGround hosting account, go to “Websites” tab and click on “All Site Options” link showing against the site. This link will be showing against each site in your account, therefore, make sure to click the link against the correct site.
On the “Website Details” page, click on the three vertical dots icon showing against the site and select “Offline Mode” option.
You will see a pop-up indicating the site will be taken down offline. Click “Confirm” button to enable offline mode.
There will be a success message showing as a slide out mentioning the website is suspended.
Now, check the traffic in Google Analytics and the spam referral traffic should come down to 0 as the site will be inaccessible. Wait for 10 to 15 minutes and then click on “Set Online Mode” button from your hosting account. This will disable offline mode and allow visitors to access your site.
You will see a success message showing the site is unsuspended and online mode is enabled.
What Happens in Offline Mode?
Enabling offline mode effectively resolved the spam traffic problem and things are back to normal again. When you access the site in offline mode, it will show “Site Currently Unavailable” page as shown below.
Remember, this is not a typical maintenance mode page. Here are the things will happen when you enable offline mode in SiteGround:
- Offline mode will completely stop all users from accessing your site online.
- Your site’s Site Tools section, database and FTP accounts will not be available.
- Emails using SiteGround servers will not work.
We expect the IP address can be easily blocked from SG Security plugin which is not the case. Finally, toggling offline and online modes helped to stop the spike in spam referral traffic. You can also use the offline mode to permanently take down your site from public visibility.