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
-
No index vs removal - Subdomains
One of my clients has a subdomain - docushare.***.edu (vs ***.edu) that they would like to not influence SEO.
On-Page Optimization | | Crescent_Sense
the question is: should they no -index these pages or remove as a subdomain? Thank You! jeremy0 -
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 -
Help with the indexation of my page
Hi all, I have a problem with my website. When writing site:www.pinesapiensa.com there're no pages indexed although the webmaster tools tells me that the sitemap file has been processed in 13 May and the number of indexed paged are 21. ¿What could be happening? I have to mention that there are two domains "www.piensapiensa.es" and "www.piensapiensa.com" addressing the same website and there's a redirection from piensapiensa.com to piensapiensa.com but it doesn't work properly. Thanks
On-Page Optimization | | juanmiguelcr0 -
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 -
CMS program that have indexing problems
I am working on optimizing a website that was built with an CMS program. I searched for what pages are indexed on Google using "site:url" command. For some reason none of the pages are indexed on Google. What is the best way to index these web pages?
On-Page Optimization | | webdynamics0 -
Depreciated content - Canononical, 301, or noindex?
I have a page that has existed on our website for many years, without ever being updated.This is what I would consider an "evergreen" content page, but it is now considered out of date and depreciated. It was never ranking high for any keyword in particular, but it is a page that has existed for many years. We have now created a more up-to-date version of the page, with much more informative content, a new URL, and of course it is SEO optimized. I am puzzled as to what I should do with my old page. Should I add a canononical link pointing it to the new updated page, or should I 301 redirect it to the new page, or should I no-index the old page? What are your thoughts and suggestions? I can give more information if needed. Thank you!!
On-Page Optimization | | jcph0 -
Removed listings: 404, internal links or redirect?
For a classifieds web site with medium/high turnover for the various listings: How would you deal with pages of removed listings? a) would you be "honest" and return a 404 since the listing is not available anymore? b) would you maintain historical data about deleted listings so that you can try and 301 redirect to a relevant search results page? c) would you keep the page alive (maybe add a noindex meta tag?) and show links to multiple relevant search results pages in an effort to strengthen internal linking?
On-Page Optimization | | seo-cat0 -
Singular / Plural
Hi SEOmoz staff I'm doing on a French website that sells Wall Stickers. The main French keyword therefore is: stickers muraux (wall stickers) sticker mural (wall sticker) When you look at my homepage title; I've put the singular and plural in there. Do you think it hurts my website? Should I eliminate my least favorite one (= sticker mural)? Any other advice? Thank you! Jacob from Belgium X45qb.jpg
On-Page Optimization | | Jacobe0