In this article I'm going to teach you how you can disable a problematic site on your hosting account via a .htaccess file, so that you can troubleshoot any problems while leaving your other sites online.

There are many factors involved that could cause a website to start using up a lot of resources from a server, and in some cases this usage can be extreme enough that it could lead to an account suspension of your account. By disabling the one problematic site on your account causing excessive resource usage, you can continue to have your other sites and email run unaffected by a possible suspension.

Disabling problematic site via .htaccess

Using the steps below I'll show you how we can temporarily disable a site called example.com on my account using a .htaccess file, so that it doesn't cause problems for the other domains on my account.

  1. Login to your cPanel.
  2. Under the Files section, click on File Manager.
  3. Select the Document Root for: option, and choose your domain from the drop-down.
  4. Ensure that Show Hidden Files is selected.
  5. Then click Go.
  6. file manager show hidden files for example.com
     
  7. Right-click on the .htaccess file and select Edit.
  8. file-manager-htaccess-edit
     
  9. If your .htaccess file didn't exist already during the previous step, click on New File at the top-left, name the file .htaccess, and finally set the directory for the file to be created to /public_html/ or the document root of your site.
  10. file-manager-htaccess-create
     
  11. You might have a text editor encoding dialog box pop-up, you can simply click on Edit.
  12. Enter in the following code in your .htaccess file to disable the site:

    ErrorDocument 503 "<h1>Site temporarily down for troubleshooting</h1>"

    RewriteEngine On
    RewriteRule .* - [R=503,L]

    file editor click on save-changesThen click on Save Changes up in the top-right of the text editor.

    This will serve a 503 response to every request. This response code signifies a temporary server issue and search engine bots know to attempt their requests again at a later time so it doesn't affect your search engine rankings.

    503-error-displayed

    If you leave these rules in place for more than 2 days search engines such as Google could start interpreting these temporary issues as longer lasting ones, and this could affect your search engine ranking.

You should now understand how to temporarily disable a problematic site so that your entire account isn't affected by its usage. If there are only certain types of requests that are causing problems, you can selecitively limit those types of requests as well.

For more information on that I'd recommend reading my other article on block users based on their user-agents which mentions using a 403 access denied response to block particular user-agents that might be slamming your site.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201642

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!