Go Daddy .htaccess

in General

Redirects on Go Daddy using .htaccess

I had a lot of trouble getting .htaccess redirects working correctly on Go Daddy. One of our customers is using Go Daddy’s WordPress hosting and we set up a new domain for them.

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]

The above in a .htaccess file worked great in our testing.

One important note: We found that the CDN Go Daddy has running cached these redirection rules and it took a day to clear. While this was happening, we thought the redirect wasn’t working. Well, it worked on every single sub page, but it didn’t work on the home page. If we loaded the url in an Incognito Window it wouldn’t redirect. But if we pressed Enter it would redirect. It was showing a 200 status on first load, and then would follow the .htaccess rules. But, this all cleared up after 24 hrs. 

Write a Comment

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.