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
-
Pages Not Showing Up In Search After Being Indexed....
Hello, I'm trying optimize my google search for local business in Fort Myers, FL area. I've created specific keywords that people are searching and have made my page title and on-page experience reflect this relevency. However, the page isn't appearing anywhere on google search even though search console has stated that the page has been indexed. My question is, how do I trouble shoot this so that I can appear in local search for these search terms?
On-Page Optimization | | scottgray06200 -
Keyword/phrase proximity
I'm curious about opinions regarding how the search algorithms treat multiple key phrases that may reside in one long tail key phrase. So for example: If I'm optimizing for "New York Litigation Lawyer", would that also give me rankings for "New York Lawyer"? My thought is that the former will be considered the primary keyword and rankings will improve mostly for that, but that the latter keyword could also possibly see some lift as well. Thanks!
On-Page Optimization | | nickturner9221 -
Indexed/Submitted URLS vs Total Indexed
Hello, My site is www.colbysphotography.com. I have Total Indexed 195 while I have 87 URLs submitted and only 79 URLs Indexed. What is the difference and is there a problem? Thanks ahead of time,
On-Page Optimization | | littlecolby
Colby0 -
Google indexing
Hi In my site I have 2 blogs, the first blog is a standard blog, every post is informative and over 6oo words with pictures and all of them are keyworded. The second blog is basically a journal of bike rides i go on, with a picture and about 100 - 300 word writeup. I use a portfolio plugin to get this online. My question is should I noindex nofollow all of these posts. Im not sure if google will see it as a lot of uninformative noncene, I dont write these as blog posts they are a journal I post 1 or 2 a day. What is the normal practice for this... they are not keyworded or seo'd I dont want them to affect my seo or rankings. Thanks Chris
On-Page Optimization | | mrcsleonard0 -
Will google regards www.example.com and www.example.com?331457 as the duplicate content?
Our site has some affiliates, and the affiliate id is the suffix following with the url "?xxxxxx". I can see Google Analytics regards www.example.com and www.example.com?331457 as the different page, but in fact they are exactly the same, the version www.example.com?331457 is the visit from our affiliate site. And yesterday I start up my Moz Pro membership, and in the crawl issues I see SEOMoz thinks www.example.com and www.example.com?331457 are duplicate content. Is this really an issue? Will the search engine thinks these two pages are duplicate content?? Thanks you guys My first question here, not too dumb I hope. -----------------Update---------------------- I should explain how our affiliates work. We are an eBook related software company, and anyone can apply an affiliate account on the transaction platform "RegNow" even without our permission because we have opened the affiliate door. When a visitor come to our order page from an affiliate site, the url will add the affiliate ID suffix "?xxxxxx", and it's combined in cookies. After the deal is done, the affiliate gets his commission. So no matter how I customize the url with URL Builder, there must be the suffix "?xxxxxx". It's the ID of our affiliate, or they will get nothing. So the key point is, will the suffix "?331457" makes Google think www.example.com and www.example.com?331457 are different pages and duplicate content?
On-Page Optimization | | JonnyGreenwood0 -
How to make google not index quotes from other sites?
Hey guys, I have a site where we post quite a lot of info from other sites. We don't want google to de-index our pages because parts of it are quotes from other sites. What would you use to make it so Google sees it's a quote from another site? Or to just make Google not index the quote? Thanks!
On-Page Optimization | | StefanJDorresteijn0 -
301 redirect OK for a newer version of a page that is a different url?
I have about 500 products with multiple urls for the same product, but different versions. I sell wine and have a different page for each vintage. I've decided that is not the best way to go, and want to point the older vintage pages to the latest version page, and make that the only page for the product as time goes on. Do I have to put a link in the text from each older page to the newer, or can I use a 301 to redirect them to the new page? I don't want google to think I'm pulling something funny.
On-Page Optimization | | JeanYates0 -
Creating optimized content: how to standardize the process?
Hello there, we are creating the new content for a website. For each web page we have created a “Pages file” to have the advantage of the spell checker. For each page, in the “Pages file” we have written the title tag (70 characters) and the meta description (155 character), so we have a kind of “template” like this in every page: title tag meta desciption text content (included the alt of the images inside the text) Every page is optimized for a single keyword/keyword phrase. What we wanna know from you guys if does exist a kind of “best practice” to test keyword density to avoid keyword stuffing penalities. In our case we opted to use “Pages” as editor, does exist a “standard Numbers/Excel spreadsheet” to understand if a keyword is over optimized in a page and so might look spammy? And in your opinion guys, what’s the best way to standardize the process of creating optimized content? Take care and thank you in advance for sharing your experience. YESdesign guys.
On-Page Optimization | | YESdesign0