301 for old domain to new domain - Joomla plugin or cpanel?
-
A client changed domains and both are being indexed.
There are thousands of content pages.
I can install a 301 redirect Joomla plugin and configure it so that each page redirects to the new domain. I have a feeling I will need to manual set every page.
OR
I can create a domain level redirect setting in cpanel using wildcards. I think this will automatically pass every old URL to the new URL.
Which is the better approach? The cpanel option sounds like less work.
-
.htaccess is always the better approach when doing redirects, its easier and gives you a bit more flexibility. Good answer Kevin.
-
Yup, the code I gave should work for #1
Here is what you need for #2
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
Cheers!
-
Sounds like a plan. I'll try the .htaccess idea.
The other issue is that both www and non www are indexable. So in addition to redirecting the old domain to the new domain (yes the URLs and content is identical)
1. The old domain www and non www need to be redirected to new domain with www.
2. The new domain non www needs to be redirected to new domain with www.
The configuration you have provided looks like it will redirect the old domain with and without www to the new domain with www. What should I add to redirect new non www urls to with www urls?
I hope I described that accurately enough. Let me know if I need to explain myself better. I've included an example:
original.com should redirect to www.new.org
www.original.com should redirect to www.new.org
new.org should redirect to www.new.org
The above examples should work for all sub folders.
-
Hi Daniel,
Love Joomla! We use it all the time. With that said you would have to manually set each individual url using ReDJ. If all of the urls are the same on the new domain as they are on the old domain you could use the Cpanel and redirect using wildcard.
Assuming that you're server is using Apache you could also create a .htaccess and add the following lines to your .htaccess file in the:
RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$ RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
Test this of course, but it should do the trick.
Kevin
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
-
We switched the domain from www.blog.domain.com to domain.com/blog.
We switched the domain from www.blog.domain.com to domain.com/blog. This was done with the purpose of gaining backlinks to our main website as well along with to our blog. This set us very low in organic traffic and not to mention, lost the backlinks. For anything, they are being redirected to 301 code. Kindly suggest changes to bring back all the traffic.
Technical SEO | | arun.negi0 -
Redirect if old browser or OS to other domain?
Hi, I use cloudflare free SSL option. All is fine except it wont work with windows XP . How do you think is it ok in case of old OS/Browser redirect visitors to other domain or subdomain? What could be impacts or consequences of such step? On the moment if page meko.lv is accessed from XP sp1,2 there is error. If it is possible how could such redirect look? Thanks
Technical SEO | | Mekounko0 -
Will doing a 301 redirect for one domain to another give the latter domain the formers links?
I have some websites that I built a few years ago that are still in existence, but I no longer have access to the sites as they weren't hosted by myself. These sites all carry a "Designed by Me" text on the footer with a link to my (now old) website. I have since done 301 redirects on the domain names that are used in the footers of these sites so they link directly to my new site. However, will these websites now show up on Google Webmasters for example as external links to my site?
Technical SEO | | mickburkesnr0 -
Redirect 301 issue. I changed my domain name and Google is killing me.
Hello SEO community: I have this problem, and I don't know exactly what to do. I recently changed my domain from uclasificados.net to uclasificados.com uclasificados.net was a free classified ads for USA in spanish, and was my most affortable site, so I wanted to convert it to .com because I thought it could get more popular with the .com domain. uclasificados.com was before a free classified ads website for Colombia, but was not very popular and had poor traffic so I moved the Colombian content to uclasificados.co. Since I changed my domain from uclasificados.net to uclasificados.com I have lost a lot of ranking, and l my traffic every day is getting lower. I have already checked the 301 redirections and they are working correctly, but even thought I keep getting less traffic and less money. I have also checked with moz tools both sites link juice, and it says that uclasificados.net have better reputation. So I was wondering if I change it back and redirect uclasificados.com to uclasificados.net but I worrie that if I do that, maybe I can make things worse. What do you recommend me?
Technical SEO | | capmartin850 -
Redirecting old domain to new domain with wordpress
Hi all, I need to change domain name to a website published on wordpress. I'd think to make these steps: trasferring the website (files+db) to a new hosting space to redirect old site (www.oldsite.com) to the new one (www.newsite.com) using rewrite rules. With these steps I'd need to transfer and reinstall files and wordpress so I would like to discover if there's some less time expending procedure to consider. Thanks and ciao Bob
Technical SEO | | bobrock40 -
Domain Registrar
Looking for opinions on some good domain registrars since I have decided to transfer from Godaddy. A question while I'm here discussing the topic. Does the reputation of a Domain Registrar affect SEO in any form?
Technical SEO | | greenfoxone0 -
Domain tld question
Hi all, I have a question regarding the ranking of exact match tld which is co.uk Currently I have a .com domain with PR of 3 and the problem is that it have one word in front of my desired keyword, so it's not exact match. I have managed to buy an exact match but it's co.uk The questions are: Will a co.uk rank better for UK than .com domain I am reading at SEOMOZ that exact match domain value is getting lower, so is it worth to redirect my current .com domain to co.uk just to get rid of that one word and start all over again with exact match. Thanks
Technical SEO | | VasilTasev0 -
301 redirect
What is a proper way to redirect any url containing a give word (anywhere in the url) to another sepcified url? Is it like this? RedirectMatch 301 ^thisword$ http://domain.com/newlocation
Technical SEO | | sesertin1