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
-
Redirects, 301's & 404's
I have tons of links that I have had added a redirect to after creating my companies new website. Is it bad to have all these 301s? How do I permanently redirect those links? Also, on Google Search Console it's telling me I have 1,000+ excluded links. Is this bad? Will it negatively affect me? Is this something to do with my sitemap? Any help would be greatly appreciated 🙂
Technical SEO | | sammecooper0 -
Forwarding a .org domain to a .com domain: any negative impact to consider?
Hello! I have a question I've been unable to find a clear answer to. My client's primary domain is a .com with a satisfactorily high DA. My client owns the .org version of its domain (which has a very low DA, I suppose due to inactivity) but has never forwarded it on. For branding/visibility/traffic reasons, I'd like to recommend they set up the .org domain to forward to the .com domain, but I wanted to ask a few questions first: 1. Does forwarding low-value DA domains to high-value DA domains have any negative authority/SEO impact? 2. If the .org domain was to be forwarded, am I correct that an SSL cert is not necessary for it if the .com domain has an SSL cert? Thanks in advance!
Technical SEO | | mollykathariner_ms1 -
Followed Linking Root Domains and No Followed Linking Domains
If you have more NoFollowed Linking Root Domains than Followed Linking Root Domains is that a problem?
Technical SEO | | INN0 -
How to optimize for new subdomain when root domain has all link juice and built up authority?
We recently took control of a root domain for a business that was not doing e-commerce. They just had a single page business card website at the root domain. However, it had been around long enough to have built up some amount of domain authority and link juice. When we took over to enable the site with e-commerce, we redirected the root domain to point to a www subdomain where the store is now located. Now, in my seomoz campaign, i see that all the link juice and authority stats are in the root domain metrics, and the subdomain we are tracking has nothing. What is the best way for me to take advantage of all the built up authority for the root domain to help with the newly enabled ecommerce site at the subdomain? or am I basically starting from scratch since i have been reading that link juice does not flow as well from root domains to subdomains. thank you and happy new year to all!
Technical SEO | | devinjy0 -
Different domains
Firstly apologies for the very brief question as I am mainly looking for your thoughts as opposed to specific help about a specific problem. I am working on a site which has two sepreate domains and within one domain, two sub domains. The two different sites both havea high page rank, PR6 each, one is the corporate site and the other is the company blog. There are also two sub domains within the corporate site, again both domains have high pr and tons of content. My question is would it be better to consolidate all the assets under one domain or is it better to keep the sites sepreate, from an seo perspective that is.
Technical SEO | | LiquidTech0 -
Mobile Domain Setup
Hi, If I want to serve a subset of pages on my mobile set from my desktop site or the content is significantly different, i.e. it is not one to one or pages are a summarised version of the desktop, should I use m.site.com or is it still better to use site.com? Many thanks any help appreciated.
Technical SEO | | MarkChambers0 -
Changing preferred domain
My company has an international website, and because of a technical issue visitors in one of our main countries cannot visits the "www" version of our site. Currently, the www version is our preferred domain - and the non www redirects to that page. To solve this problem, I was thinking of proposing the following and would greatly appreciate any feedback! (Note: If you answered my www vs. non www question, thanks - this is a follow up) 1. Set non www site as the preferred version 2. Redirect from www to non www 3. Contact our current links and ask them to change to without “www” 4. Change canonical URLs to without “www”
Technical SEO | | theLotter0 -
External Links from own domain
Hi all, I have a very weird question about external links to our site from our own domain. According to GWMT we have 603,404,378 links from our own domain to our domain (see screen 1) We noticed when we drilled down that this is from disabled sub-domains like m.jump.co.za. In the past we used to redirect all traffic from sub-domains to our primary www domain. But it seems that for some time in the past that google had access to crawl some of our sub-domains, but in december 2010 we fixed this so that all sub-domain traffic redirects (301) to our primary domain. Example http://m.jump.co.za/search/ipod/ redirected to http://www.jump.co.za/search/ipod/ The weird part is that the number of external links kept on growing and is now sitting on a massive number. On 8 April 2011 we took a different approach and we created a landing page for m.jump.co.za and all other requests generated 404 errors. We added all the directories to the robots.txt and we also manually removed all the directories from GWMT. Now 3 weeks later, and the number of external links just keeps on growing: Here is some stats: 11-Apr-11 - 543 747 534 12-Apr-11 - 554 066 716 13-Apr-11 - 554 066 716 14-Apr-11 - 554 066 716 15-Apr-11 - 521 528 014 16-Apr-11 - 515 098 895 17-Apr-11 - 515 098 895 18-Apr-11 - 515 098 895 19-Apr-11 - 520 404 181 20-Apr-11 - 520 404 181 21-Apr-11 - 520 404 181 26-Apr-11 - 520 404 181 27-Apr-11 - 520 404 181 28-Apr-11 - 603 404 378 I am now thinking of cleaning the robots.txt and re-including all the excluded directories from GWMT and to see if google will be able to get rid of all these links. What do you think is the best solution to get rid of all these invalid pages. moz1.PNG moz2.PNG moz3.PNG
Technical SEO | | JacoRoux0