How do you create a 301 redirect for www.mysite..com/index.html in htaccess.
-
I understand that it is possible to create a 301 redirect for www.mysite..com/index.html to www.mysite.com. (as well as subdirectories.) How is this accomplished? My hosting company says that setting this up in htaccess will cause "Apache to geti into an infinite loop and the page won’t load." I have read on the forum that this is possible. Any help would be greatly appreaciated.
THanks. Perri
-
-
Unfortunately we have off-site links that point to directory/index.html
-
Firstly make sure you have no on-site references to index.html else you'll be distilling your link juice. Ensure all references to you home page are www.mysite.com/
For the redirect try the following:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://www.mysite.com/ [R=301,L]
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Aggregator/comparitor site outranking us
Hi I would like to know if anyone has experience with trying to outrank an aggregator/comparitor website. We are being beat by one that also includes our range of products in their comparisons and I was wondering if there was a smart way around this?
On-Page Optimization | | Discovery_SA2 -
Indexing Issues
One of the main pages on my site, http://www.waikoloavacationrentals.com/kolea-rentals/condos, I have been having a hard time getting google to index it correctly or at all. It is one of the top pages on my site and should be in my sub links in google, but it is not even showing up in searches. Any input would be appreciated. The only red flap issue is the number of outgoing links, but that is the way the page is supposed to be. I would assume most real estate listing pages are very similar. Ultimately when you look at traffic, time on page, inbound links, etc. it is one of the top pages on my site in all those categories. Any input would be greatly appreciated.
On-Page Optimization | | RobDalton0 -
301 Redirect or landing page
Hi everyone. I'm currently doing some SEO for a client, at the moment he has some landing pages which are categorised, but the category is set as a 302 redirect. I have a dilemma whether to 301 redirect to the landing page or make a page for each category. The link structure is as follows - http://examplesite.co.uk/products/fire/company-1/product/ so currently this is set as a 302 redirect - http://examplesite.co.uk/products/fire/company-1/ Do I make this page a category page and link the page to the children with some on-page optimisation or 301 redirect it?
On-Page Optimization | | Unbranded_Lee0 -
301 twice redirect (no negative)
Can i made twice 301 redirect, because i got "droped" domain and i dont want negative effect to new website. Can i redirect users some other way with no negative effect for fresh website?
On-Page Optimization | | cerar0 -
301 rediects - weird characters
Hi, Just cleaning up some 404 errors in my site in GWT and noticed a couple of external links pointing at me that are wrong. Basically they are from a couple of DIY forum sites (I've not put these links in place myself they are 100% natural) and it appears that the owners of the forums amend the links (inserting characters into link) so they are not quite right. How would I go about redirecting the following - www.example.co.uk/blueberry_pie.htm Whatever I try doesn't work and I always end up with a 404! Cheers
On-Page Optimization | | Jon-C
J0 -
No index?
Hi, I have about 600 posts and most of them are not really optimized (some of them are flash photo gallery). Should I do no index them? They are just too many to optimize them. My website is http://www.soobumimphotography.com/ Thank you
On-Page Optimization | | BistosAmerica0 -
Http://www.xxxx.com does not re-direct to http://xxx.com
When typing in my website URL www.earthsaverequipment.com successfully re-directs to earthsaverequipment.com as specified in robot. However if you type http://www.earthsaverequipment.com it brings up a 404 error Is this a potential issue? if so is there a way to fix it? thanks
On-Page Optimization | | Earthsaver0 -
Tags to index or to no index that is the Question
Sorry for the silly Shakespearean introduction but what are peoples opinions on leaving tag clouds to be indexed or no indexable by the search engines. I tend to leave them non indexable at the moment. I use wordpress for blogging as do most others.
On-Page Optimization | | onlinemediadirect0