horsegoer Posted July 1, 2011 Report Share Posted July 1, 2011 How can I take my site off-line(not live) while I make all the changes...maybe a month or so? Thanks Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted July 1, 2011 Report Share Posted July 1, 2011 Well, first thing you're going to want to do is make a simple webpage that tells your visitors your website is going to be unavailable for about a month. Take a look over Smashing Mag's article about these maintenance pages. Second thing you want to do not only for website security but SEO purposes is to temporarily redirect all traffic to that page. I'm not exactly what the exact syntax for this kind of redirection would be but I would highly recommend Apache Lounge and ask the questions about temporary redirection there. You're going to want to ask something along the lines of:I'm doing website maintenance and I plan for my website to be offline for about a month. I have a maintenance page and a folder with the images for the page in it and I would like to know the best way how to do this through an htaccess file. All traffic would need to be directed to that page except for my IP address and I would like to reduce the damage this might have for SEO. Anyone have any suggestions? What you definitely don't want to do is deny access to everything (a 404 error) which is going to kill your SEO like no tomorrow as well as estrange your clients. Apache Lounge is fairly active so you should get a response in less than a day. If they're unable to help, just post back in here for more help. I'm sure Mike will be along shortly to asnwer your question, but I thought I'd just put my two cents in. Good luck! Quote Link to comment Share on other sites More sharing options...
horsegoer Posted July 1, 2011 Author Report Share Posted July 1, 2011 Ok, thanks ver much. How to I get seo?. I see when I type my site name into google it does not come up? Thanks Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted July 1, 2011 Report Share Posted July 1, 2011 SEO is basically a blanket term that refers how you are "seen" in the eyes of search engines like Google or Bing. Some sites have really good SEO where they might be the first website that comes up for the search term "soda," for example. Search engines don't like when they are going through your site and suddenly they can't get to anything that they could get to previously. Oftentimes, punishment for having that happen is that you will be appear lower in searches for your site or what you offer. Quote Link to comment Share on other sites More sharing options...
horsegoer Posted July 1, 2011 Author Report Share Posted July 1, 2011 Ok, how to increase my searchability/search results? Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted July 1, 2011 Report Share Posted July 1, 2011 The big search engines like Google and Bing each have pages where you can submit your site to be "crawled" and thus appear in search results. You can submit your site for search for:Google: https://www.google.com/webmasters/tools/Bing: http://www.bing.com/webmasterNow that you've added you site to both search engines, it's important to know that nothing will happen instantly. It might take 2-3 days for you site to start showing up in searches specifically for you site and even longer for general keywords that your site might be applicable for. Quote Link to comment Share on other sites More sharing options...
horsegoer Posted July 1, 2011 Author Report Share Posted July 1, 2011 Thanks anlot for your help Quote Link to comment Share on other sites More sharing options...
fshagan Posted July 1, 2011 Report Share Posted July 1, 2011 How can I take my site off-line(not live) while I make all the changes...maybe a month or so? Thanks Kuemerle5 is right; the proper way to do it is to use a plain text file called ".htaccess" in your /public_html/ directory. Note that the file is a little strange to us Windows users; it starts with a dot. Some older versions of Windows will not allow you to create it that way on disk. If that's the case, you can create a "htaccess.txt" file and then rename it after uploading it using your FTP program. I think this will work: create a plain text file on your local computer with these lines in it: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule> Connect to your account with FTP, and see if there's already a ".htaccess" file in the /public_html/ folder. If there is, rename it to ".htaccess-old". Then upload your new ".htaccess" file. Now, any URL on your site will be re-directed to the "index.html" file listed in the next to last line. (If you are using an "index.php" file, just edit the name there). Quote Link to comment Share on other sites More sharing options...
stocktrader Posted July 3, 2011 Report Share Posted July 3, 2011 Since we are on the subject, is there a way to forward all traffic to the home page while still having an admin have access to the site? I ask this because there are times where I need to work on my site while it's live but I don't want visitors viewing the site. I know I could password protect pages, but I would want SEO visitors who are coming to a random page being hit with a password prompt. Quote Link to comment Share on other sites More sharing options...
fshagan Posted July 3, 2011 Report Share Posted July 3, 2011 Since we are on the subject, is there a way to forward all traffic to the home page while still having an admin have access to the site? I ask this because there are times where I need to work on my site while it's live but I don't want visitors viewing the site. I know I could password protect pages, but I would want SEO visitors who are coming to a random page being hit with a password prompt. I don't know of one off-hand. You could always use the standard redirection in your index.php file in each folder, but have another "secret index file", say one named "home.php" or "home.html" for the admin. The admin could then reach into each directory by using that filename on the end of the URL: http://mydomain.com/home.php. Its certainly not secure, and anyone with links deeper into the site will still be able to reach them. I think this is probably a case where you would just want to password protect the site (cPanel has an option to do this). An example of an index.php page that redirects to the home page is: <?php Header("Location:http://mydomain.com"); ?> Any folder that is in will send the browser to the URL "http://mydomain.com". There may be a way to do a redirect-for-all-but-one-IP address with some programming. I just don't know of any that are prebuilt. Quote Link to comment Share on other sites More sharing options...
fshagan Posted July 3, 2011 Report Share Posted July 3, 2011 I just read a brief, not too complete explanation of how to deny all IP addresses except your own in .htaccess Most of us are on "dynamic IPs" from our ISPs (which means we're allocated a different IP address each time we turn on our router). So this has the potential of locking you out of your site until you change the .htaccess using FTP. But, that being said, you could test this in a folder by placing a .htaccess file there with just these two lines in it: Deny from all Allow from xx.xxx.xx.xxx Where "xx.xxx.xx.xxx" is your current IP address. Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted July 3, 2011 Report Share Posted July 3, 2011 Meh, I would shy away from doing a deny directive like that just because search bots hate running into those and visitors will get an ugly 'access denied' page. And if a search bot repeatedly gets denied from indexing a known page, it will begin removing pages which is what you don't want. I would say redirection with a temporary redirection http status code like a 302 or 307 would be your best bet. Quote Link to comment Share on other sites More sharing options...
fshagan Posted July 4, 2011 Report Share Posted July 4, 2011 Meh, I would shy away from doing a deny directive like that just because search bots hate running into those and visitors will get an ugly 'access denied' page. And if a search bot repeatedly gets denied from indexing a known page, it will begin removing pages which is what you don't want. I would say redirection with a temporary redirection http status code like a 302 or 307 would be your best bet. Not to mention getting locked out yourself if your modem resets for any reason (power outage, etc.) But it is possible to do it. Depending on the length of the development cycle, Stocktrader's question is one I run into every now and then. How do I work on a site without having people visit it during development? I usually just do it through obscurity, and renaming the pages afterward. IF I'm redoing an about page, I leave the current one in place and develop one with an obscure name, like "about-me-test.php". A search engine might crawl it, so I usually put a <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> directive in the head section. Anyone who knows the page can access it, but few know about it. You do want to make sure and remove that meta directive when you rename the page. Quote Link to comment Share on other sites More sharing options...
stocktrader Posted July 4, 2011 Report Share Posted July 4, 2011 It would usually be for a full day, but I'm not sure if that is still long enough to get hit with SEO penalties and Google deletions. I will probably try the "Forward all IP addresses except my own" option. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.