Is This 301 redirection correct??
-
Hello Everyone,
I have Added This in .htaccess.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^./index.html
RewriteRule ^(.)index.html$ http://www.domain.com/$1 [R=301,L]ErrorDocument 404 /index.html
Is this Correct ?? or need any change,
please help,
thanx in advace .
-
Thanx Martin for your reply
Yes, i have Applied The same in .htaccess file but still my index.html page is not getting redirect to domain.com
-
Looks good to me, as long as you replaced domain.com with your own domain name and you're using an index.html file for the homepage.
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
-
Google ranking 301 redirected vanity urls
We use vanity URLs for offline marketing. An example vanity URL would be www.clientsite.com/promotion, this URL 301 redirects to a page on the site with tracking parameter ex: www.clientsite.com/mainpage?utm_source=source&utm_medium=print&utm_campaign=xyz. We are running into issues with Google ignoring the 301 redirect and ranking these vanity URLs instead of the actual page on the website. Any suggestions on how to resolve?
Intermediate & Advanced SEO | | digitalhound0 -
How to redirect an url in .htaccess when "redirect 301" doesnt work
I have an odd page url, generated by a link from an external website, it has: %5Cu0026size=27.4KB%5Cu0026p=dell%20printers%20uk%5Cu0026oid=333302b6be58eaa914fbc7de45b23926%5Cu0026ni=21%5Cu0026no=24%5Cu0026tab=organic%5Cu0026sigi=11p3eqh65%5Cu0026tt=Dell%205210n%20A4%20Mono%20Laser%20Printer%20from%20Printer%20Experts%5Cu0026u=fb ,after a .jpg image url, and I can't get it redirect using the redirect 301 in .htaccess to the properly image url as I use to do with the rest of not found urls eg: /15985.jpg%5Cu0026size=27.4KB%5Cu0026p=dell%20printers%20uk%5Cu0026oid=333302b6be58eaa914fbc7de45b23926%5Cu0026ni=21%5Cu0026no=24%5Cu0026tab=organic%5Cu0026sigi=11p3eqh65%5Cu0026tt=Dell%205210n%20A4%20Mono%20Laser%20Printer%20from%20Printer%20Experts%5Cu0026u=fb to just: /15985.jpg
Intermediate & Advanced SEO | | Status0 -
301 redirect with /? in URL
For a Wordpress site that has the ending / in the URL with a ? after it... how can you do a 301 redirect to strip off anything after the / For example how to take this URL domain.com/article-name/?utm_source=feedburner and 301 to this URL domain.com/article-name/ Thank you for the help
Intermediate & Advanced SEO | | COEDMediaGroup0 -
Can I make 301 redirects on a Windows server (without access to IIS)?
Hey everyone, I've been trying to figure out a way to set up some 301 redirects to handle the broken links left behind after a site restructuring, but I can only ever find information on 2 methods that I can't use (as far as I can tell). The first method is to do some stuff with an htaccess file, but that looks like it only works on Linux-based servers. The method described for Windows servers is generally to install this IIS rewrite/redirect module and run that, but I don't think our web hosting company allows users to log directly into the server, so I wouldn't be able to use the IIS thing. Is there any other way to get a 301 redirect set up? And is this uncommon for a web hosting company to do, or do you all just run your sites on Linux-based servers or your own Windows machines? Thanks!
Intermediate & Advanced SEO | | BrianAlpert780 -
301 Redirecting multiple domains to brand new domain
Hi guys, I have read quite a bit of stuff on 301 redirects after Penguin. Hoping someone could help me out. im looking at a way to do a legit 301 redirect without passing the penalty. I have acquired two businesses, business1 and business2, that both had websites that were hit by penguin. Ive anaylsed there backlinks and theres a lot of spammy forum links and comments and I was also informed they were both using buildmyrank. A side note, buiness2 only started using BMR after it noticed business1 have large amounts of high PR links. business1.com was ranking at position 1 till the penguin hit. Business2.com was ranking around page 2 I work in the same arena as these two businesses and didnt generate any business via the internet. When these 2 businesses failed (due to loss of rankings and traffic) i decided to take them over. What I am thinking of doing is 301'ing both business domains to my brand new, zero links, domain which will be the name of my new company. I will combine the content from both sites, around 1000 pages, in to the new one. So my question is, does 301'ing multiple domains, that target the same keywords, and operate in the same niche, look less "spammy" then 301'ing 1 domain? I'm trying to look at it in the eyes of google. It is a legit merging of businesses. Thanks for your help, really appreciate your time
Intermediate & Advanced SEO | | JohnPeters0 -
Very Puzzled --- 301 ReDirects Did Not Work - Lost Rankings - Any Thoughts?
This one has us stumped and frustrated, hopefully someone out there in SEOMoz land can give us some thoughts and/or suggestions on what's going on and how to remedy. This is a follow-up to a post I made awhile back. Here is an excerpt from the original post -- We currently have 3 different versions of our State Business-for-Sale listings pages - the versions are: Version 1 -- Preferred Version (Links on Homepage www.businessbroker.net) http://www.businessbroker.net/State/Vermont-Businesses_For_Sale.aspx Title = Vermont Business for Sale Ads - Vermont Businesses for Sale & Business Brokers - Sell a Business on Business Broker (I realize the title needs work) Version 2: (Links on this page: http://www.businessbroker.net/listings/blistings.ihtml) URL Prior to 301 change --- http://www.businessbroker.net/Businesses_For_Sale-State-Vermont.aspx Title = Vermont Business for Sale | 120 Vermont Businesses for Sale | BusinessBroker.net Version 3: (Links on this page: http://www.businessbroker.net/businessesforsale.ihtml) URL Prior to 301 change --- http://www.businessbroker.net/listings/business_for_sale_vermont.ihtml Title = Vermont Businesses for Sale at BusinessBroker.net - Vermont Business for Sale While the page titles and meta data are a bit different, the bulk of the page content (which is the listings rendered) are identical. OK, so we decided to test this on 5 of our State pages - I will use VERMONT in this discussion. We did 301 ReDirects on Version 2 and Version 3 -- they now redirect to Version 1 - we did the redirects and also changed the URL's on the pages. Prior to the change, we were ranking for keywords like "Vermont Business for Sale" and some other similar keywords -- on 1st page of Google --- now, we have lost our rankings big time. Did we do something wrong? I thought when you did 301's the majority of link juice was supposed to be preserved (losing 10% or so) -- this didn't happen in our case. Any help on what we can do would be appreciated. We only did 5 States as a test and also noticed big drops for Maine as well. These were both states where VERSION 2 was the page that was showing up in SERPs. Thanks in advance for wading through this long post and any help you can provide!! Matt
Intermediate & Advanced SEO | | MWM37720 -
Duplicate titles but redirecting anyway (without redirects set up!!!)
Google has done a crawl of my site and is flagging up duplicate titles on my wordpress site. This appears to be due to the face that some posts are tagged in more than one category. I have just gone to make sure that each post just has one category and add redirects and I've noticed that all the duplicate title issues google has notified me about appear to redirect anyway. For example: http://www.musicliveuk.com/latest-news/live-music-boosts-australian-economy and http://www.musicliveuk.com/live-music/live-music-boosts-australian-economy have duplicate titles apparantly but the 1st url redirects to the 2nd one. I use the redirection plug in but have no redirection set up for that url so I'm a bit confused. And if they're redirecting anyway then why is google flagging up duplicate titles? Any help would be much appreciated.
Intermediate & Advanced SEO | | SamCUK1 -
Any way to find which domains are 301 redirected to competitors' websites?
By looking at the work from an SEO collegue it became clear that his weak linkbuilding graph probably is not the cause for his good rankings for a pretty competitive keyword. (also no social mentions where found) I was wondering what it could be, site structure and other on page optimization factors seems to be ok and I don't think there will be exceptionally good or bad user behavior... Finally I looked at the competitors and found that they have more links, better content en better design, so I got a little stuck. The only reason I can think of is that he is doing 301 redirects (or is rel=canonical tags). Is there a way to trace these redirects back to the source in order to include this important variable in your competitor research? thnx
Intermediate & Advanced SEO | | djingel10