Some Hostgator Woes

HostgatorI know, it’s been a while. This is a post about recent problems with Hostgator related to their web hosting services.

I’ve been happy with them since I subscribed but it seems recently they’ve been giving me problems. The first problem was when they did an “emergency maintenance” on the server where my sites are hosted. My account (and sites, therefore) were inaccessible for an hour at least (could be longer, since I only counted the time since I discovered it). And I had to contact support twice. First to report and know what’s going on, and second to follow up and “reset” the account. My only request was to be informed about server maintenance whether emergency or not.

The second one is apparently an ongoing one related to the script inside the cPanel dashboard, particularly the Hotlink Protection tool under Security, that caused images not to display. And if you access the image URLs directly you get a 403 (Access Forbidden) error.

Initially I thought it was just a need to chmod or chown my files so I contacted support to have them do it for me. When that didn’t work, a support ticket was created. At this point I realized it might have something to do with .htaccess, similar to what I had before when I used Hotlink Protection. One Hostgator admin wrote back with this:

Hello,

http://www.noelacosta.com had an issue with the .htaccess file that was causing the images to get 403 errors. I removed 2 duplicate lines near the bottom that were rewriting the urls for the images. If there is anything else we can do for you, or if you have any questions, please let us know.

The new one looks like this:
root@gator535 /home/ncacosta/public_html/noelacosta.com/blog]# cat .htaccess
RewriteEngine on

Options -Indexes
# BEGIN WordPress

# END WordPress
RewriteCond %{HTTP_HOST} ^blog.noelacosta.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.noelacosta.com$
RewriteRule ^/?$ "http\:\/\/www\.noelacosta\.com" [R=301,L]

The old one:
[root@gator535 /home/ncacosta/public_html/noelacosta.com/blog]# cat .htaccess.orig
RewriteEngine on

Options -Indexes
# BEGIN WordPress

# END WordPress
RewriteCond %{HTTP_HOST} ^blog.noelacosta.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.noelacosta.com$
RewriteRule ^/?$ "http\:\/\/www\.noelacosta\.com" [R=301,L]

RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

True enough, when I accessed all other domains in my account, these lines were added by Hostgator’s cPanel script. I asked them to remove them for me and pointed out that they should look into their script.

Lesson for me is not to use shortcuts in hotlink protection and just study how to create my own .htaccess directives.