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
-
Is it a good practice to reduce number of redirections (301) after a period of time?
Is it good to use disavow tool and get rid of old URLs i.e. links for pages and posts which we have deleted from our website and added 301 on them?
On-Page Optimization | | Ravi_Rana0 -
Should I redirect a popular but irrelevant blog post to the home page?
Hi. I'm trying to get my website; www.ciphr.com , to rank for keywords relevant to "HR Software" in the UK. It's a highly competitive industry and we rank ~mid to low on page one for some of our ideal keywords that are highly relevant and high volume. Years ago we took the decision to blog about topics more loosely related to the world of work. One of our blog posts, about plants in the office https://www.ciphr.com/advice/plants-in-the-office/ is popular. It gets decent traffic and consistently builds backlinks to the post without any further effort on our part. The specific page has a PA of 46 and DA of 55 with >500 domains linking to it. This compares to our home page with a PA of 47 and 700 linking domains. It is typically the home page that ranks for our money keywords "HR Software" "HR Systems" in the UK. Because this blog post is so loosely related to our actual business, the traffic it generates is highly unlikely to turn into a customer of ours. I am considering redirecting the blog post to the home page to pass link juice to the home page. The concern I have is that, based on the anchor text and contextual signals from linking pages, Google might then infer that our home page is less relevant for our money keywords and more relevant for "plants". Are my concerns unfounded? What are your thoughts? Should I redirect the blog post to the home page? Another internal page? Keep the blog post live? Thanks
On-Page Optimization | | crichardson19922 -
Www no longer redirects
Hi there, A while back I dropped the www from my domain. Everything redirected ok and I could still access my site using www and it would simply redirect to http://mysite This no longer seems to be occurring. I don't think I have changed anything? I don't believe I had anything in my htaccess however I am looking for some assistance in doing so. I've done a bit of reading but am not 100% confident! If anyone is interested, the url is http://cdkeyprices.com Thanks
On-Page Optimization | | MrPenguin0 -
301, Canonical, and Page Authority
I have been trying to find an answer to this question for awhile now but I am having trouble. I have a clients site that I need to redirect and Canonical the pages to correct duplicate content issues and title tags however, the issue with this client is that some of the www. pages have a higher PA than non-www and the reverse is true. I am wondering if there is an issue with chasing the PA to get the highest PA per page (even if this means the site is going to be a mix of www. and non-www. pages)? I am extremely new to SEO so I apologize ahead of time if I missed this in the forum.
On-Page Optimization | | Highline_Ideas0 -
Temperary redirects
I have a problem with temp redirects, I have a dating site and the redirects happen when guests on the site are prompted to purchase a subscription while trying gain access to the sites contents. I was told to change them to 301 redirects but don't know how. any help, thanks guys.
On-Page Optimization | | clickit2getwithit0 -
Changing Ttile Tags & 301's
I recently began re-optimizing my title tags site wide. Could this cause 301 redirects and the loss of backlinks?
On-Page Optimization | | BeautyStop0 -
301 Redirect to mobile site effecting rankings
On my site I redirect users when on a mobile device to be redirected to my mobile version of my site. In the last couple weeks I added that redirect in my htaccess file. I just realized today that I am doing a 301 redirect. In the last few weeks my ranking have gotten lower. I am starting to think that because of the redirect my mobile site is not as optimized as my regular site and therefor is effecting my rankings. My question is how can I redirect my users to my mobile site but not use a 301 AND how do I get google to use my main site content for ranking on the mobile side. I want to go back to getting my search rankings on the mobile side using my main sites content. Can I simply remove the 301 on the redirect? Hope that makes sense.
On-Page Optimization | | cbielich0 -
Www redirect
I get the following message when I try to start a new campaign. "We have detected that the domain www.shewula.nl and the domain shewula.nl both respond to web requests and do not redirect" In the q&a I found answers to this problem and tried to fix it. No success yet. This is what I have in my old ht.access file: RewriteCond %{HTTP_HOST} ^www.shewula.nl$ RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/ RewriteRule (.*) /STICHTING_SHEWULA/$1 [last] RewriteCond %{HTTP_HOST} ^shewula.nl$ RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/ RewriteRule (.*) /STICHTING_SHEWULA/$1 [last] I changed it to ( got it from the answers 😞 RewriteCond %{HTTP_HOST} ^shewula.nl
On-Page Optimization | | thomasfasting
RewriteRule (.*) http://www.shewula.nl/$1 [R=301,L] This gave me a 500 internal error in the server header checker tool. Does anybody know how I can fix this? The website is in a folder in the root of my other website www.fastingfotografie.nl Could this give me a problem? Thanks. Thomas0