The last part redirects index.html to /
There would only be a loop if you redirected / to index.html
99.9% sure this'll work for you I'm using the exact code on a small site right now and it's working fine
Welcome to the Q&A Forum
Browse the forum for helpful insights and fresh discussions about all things SEO.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
The last part redirects index.html to /
There would only be a loop if you redirected / to index.html
99.9% sure this'll work for you I'm using the exact code on a small site right now and it's working fine
Probably the simplest way to redirect the non-www to the www is to put this in your .htaccess file
RewriteEngine On Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^./index.html
RewriteRule ^(.)index.html$ http://www.example.com/$1 [R=301,L]
For reference the .htaccess file goes in the root of your domain via whatever file transfer program you use and of course replace example.com with your domain
If you get stuck, let me know
Hmm, I'll probably say one thing and someone will come along with the opposite again, lol.
Well, the only real advantage of forwarding the domain is for type in traffic. If it's a site that people would expect to be live they may just put it straight into the address bar and end up at your site. 301 redirecting that domain means that it won't appear in the search engines. Your new site won't really rank for the exact match domain you're forwarding.
You could also make an index.html/php page and meta refresh them to your main domain and that would allow the site to rank for exact match but still not really going to give you much benefit.
If the URL is awesome, consider putting some content up and sending it to your site via links, but otherwise I'd just forward them at the registrar.
No change, pretty much at all, overall at least.
However some pages we had some poor quality links on have dropped a bit in ranking, but weren't huge traffic generators anyway.
I'll certainly be keeping an eye on it.