How to do this 301 redirection
-
Hi there! I have two domains with the same content. Some guys in this forum posted that It would be convinient to do a 301 redirect from one ".com" domain to ".es" domain (my potential market). I just tried to set it up in the htaccess file but it dind't worked at all.
Something like:
redirect 301 http://wwww.domain.com http://www.domain.es
I just configure in the webmaster tools the domain www.domain.com as preferred domain insted of http://domain.comThe same with the other domain.
Any help?
many thanks
-
Hey Juan,
On the old domain have this in your .htaccess file
RewriteEngine On
RedirectMatch 301 (.*) http://www.domain.es/$1Then you may want a separate HTACCESS rule to forward all traffic without www. to use it
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]I hope that helps, but I have a feeling I may have missed the point of the question. Let me know if I did.
- Andie
-
Try this
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
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
-
Unsolved 301 Redirect chain http>https>https:/www
Dear community, I have the same issue with redirecting chain from http - https and then to https:// www.____
On-Page Optimization | | Damian_Ed 0
In one of the previous opened discussions the solution given was: you'd update the server level rule to point directly to the end URL form.
Re: 301 Redirect chain Are there any tutorials or resources available to help me properly implement this solution and resolve this issue? Tags: 301 Redirects, HTTPS, WWW, Server Level Rule, Redirect Chain Any tutorials how to do it properly to resolve this issue ?0 -
Redirect and Redirect Error in Moz Crawl
Hello, We have a wordpress blog attached to our magento website located at domain.co.uk/blog/ Moz was coming back showing we had multiple page versions on show (http and https) So i updated the htaccess file to what is below. This has fixed most of the errors, however the homepage is being a little tricky. Moz is now saying that the page is redirecting and redirecting again http://www.domain.co.uk/blog to
On-Page Optimization | | ATP
http://www.domain.co.uk/blog/ to
https://www.domain.co.uk/blog/ BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /blog/</ifmodule> RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L] END WordPress Within wordpress settings the urls are set up as follows Wordpress Address URL: https://www.domain.co.uk/blog Site Address URL: https://www.domain.co.uk/blog i tried to add a trailing / to these but it gets automatically removed. So i am assuming that wordpress is serving up https://www.domain.co.uk/blog **RewriteBase /blog/ **is re-directing it to / then my https rewrite is re-directing it again I am not sure where exactly to fix this, could anybody advise? Many thanks,0 -
301 or Keep 2 Chocolate Best Sellers SEO?
Hi All, So we have two best selling organic chocolates that are very similar. http://www.santabarbarachocolate.com/bulk-organic-dark-chocolate-72-without-soy-lecithin/ and http://www.santabarbarachocolate.com/bulk-organic-dark-chocolate-72-without-soy-lecithin/ Because we are a small company it would be ideal to offer only one of these chocolates due to the cost of making it from the raw cacao. This is the question: From a SEO page rank perspective, do we get better rank by 301 redirecting one chocolate to the other thereby generating more traffic through traffic consolidation to one chocolate. Or do we get better SEO rank by having two chocolates on the site that both get clicks with different content? Basically it is a question of divided forces. Thanks for your help, Jason
On-Page Optimization | | santabarbarachocolate0 -
Inventory Pages that are Sold, 404 vs 301?
I am working with a company that sells high-priced automobiles. Each Unit has its own URL We currently leave most sold inventory live on the site as it draws in many leads (the units are visually shown as sold, so it shouldn't be a UX issue in most cases). We are wanting to start pruning some old units (this is in WordPress - custom post type) and I'm not quite sure what the best solution for this site is with removed units. Some ideas: Remove the units pages that are no longer needed, resulting in any links 404'ing to a useful 404 page. Remove the units pages, and 301 them to the Homepage (I don't really want to do this, as it seems like really poor UX) Remove the units page, and 301 the user to a specific "This item has sold" page that is shared by all sold units, but may not be the sites full 404. another option I haven't thought of? I dont' want to do anything that would confuse or get search engines upset, and I'm not sure how bad 404's are, I see some info on how bad they are, some that say they aren't bad. I'm guessing it is as usual, some gray area in the middle.
On-Page Optimization | | Andy_Staple0 -
How to redirect subdomain to new blog directory
I have moved my wordpress blog from a subdomain to a subdirectory /blog/ on my site. What is the best way to setup a redirect from the subdomain to the new /blog/ directory? Or should I just delete the subdomain blog and wait for google to index it on /blog/. I need to do one or the other so as not to run into duplicate content issues.
On-Page Optimization | | SamCUK0 -
To redirect or not to redirect...That is the question
We have old product data that is being updated (approx 30k sku's). Most of the old pages have been indexed and drive the majority of our online sales. But, the updated products have different titles, H1's, etc and have been re-formatted for the better in terms of usability. So, should we redirect thousands of pages to the new pages? Will Google be ok with that?...or should we reformat the current url's with the new data? And, if we reformat current url's with new data...the fear is that the on-page elements that the pages are being pick up for will get wiped out, (be it the H1 in some cases or the title or alt tag for another, etc) because it's simply too much to retain them during the import. Please share
On-Page Optimization | | nisvision0 -
Wordpress pages URL's redirection.
I was checking W3C Markup Validation and in report it was shown that that pages (not post or any other URL's just PAGES) at investmentcontrarians.com are 301 redirected. e.g. original URL "http://www.investmentcontrarians.com/debt-crisis" which is redirected to "http://www.investmentcontrarians.com/debt-crisis/" I know that its not that serious issue, but still want to know why only pages are being redirected and how can we avoid it.
On-Page Optimization | | NumeroUnoWebSolutions0 -
301 redirects / clean urls (2)
hello again! 1st i want to thank robert, istvan and everyone else for the great answers to my last question. i guess i should have been a bit more specific with the questionas i am still a bit unclear about a couple of things. i forgot to mention that we actually moved the site several months back and redirected all the "category" pages, but, i wasnt aware that the "product" pages were never redirecte! so my next questions are: at this point is it even worth redirecting those old product pages? if so, should we use the IP address as shown below or the domain as shown below ...i am guessing at the IP address. http://72.3.181.97/catalog/CanineCushionDogCouchBeds.aspx
On-Page Optimization | | k9byron
http://www.k9electronics.com/catalog/CanineCushionDogCouchBeds.aspx also, our old site was never deleted from the server. our ranking / sales dropped off by about 50% when the new site went live so im guessing this can be directly contributed to the products not being redirected / duplicate content from the 2 sites? im also guessing i need to find a new developer ..can i get a vote on that? 😉 <colgroup><col width="856"></colgroup>
| http://72.3.181.97/catalog/CanineCushionDogCouchBeds.aspx |0