This short guide explains how to redirect the "Home page" of your site to a temporary web page.
I'm assuming your website is PHP-based (ie. Joomla, WordPress or other) and it is hosted on a LAMP Server.
Those assumptions also imply your home page (usually) is named “index.php”.
But for additional clues, please check your apache loading order defaults (on the apache configuration file).
2 Ways to do Redirect your Home Page to a Temporary Page:
1) Your redirection could be as simple an an “Under Construction” basic HTML page named "index.html", which you will simply upload to your site's root.
By default, "index.html" has loading precedence over "index.php" and will simply be loaded first.
That's simple redirection at work!
Alternatively, if your website is hosted on Cpanel/WHM, you may:
2) Create a manual redirection through the "Redirects" function:
- From type select "Permanent (301).
- Select your domain from the dropdown and leave the following field empty.
- Put the checkmark on "Redirect with or without www".
- Do Not click enable the Wildcard Redirect otherwise "your.site.sucks.domain.com" will be considered as valid and will take you to your website!
- Click on Add and this is it, Cpanel redirection in place!