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
-
Merge 2 websites into one, using a non-existing, new domain.
I need to merge https://www.WebsiteA.com and https://www.WebsiteB.com to a fresh new domain (with no content) https://www.WebsiteC.com. I want to do it the best way to keep existing SEO juice. Website A is the companies home page and built with Wordpress Website B is the company product page and built with Wordpress Website C will be the new site containing both website A and B, utilizing Wordpress also. What is the best way to do this? I have research a lot and keep hitting walls on how to do it. It's a little trickier because it's two different domains going to a brand new domain. Thanks
Technical SEO | | jarydcat10 -
New site: More pages for usability, or fewer more detailed pages for greater domain authority flow?
Ladies and gents! We're building a new site. We have a list of 28 professions, and we're wondering whether or not to include them all on one long and detailed page, or to keep them on their own separate pages. Thinking about the flow of domain authority - I could see 28 pages diluting it quite heavily - but at the same time, I think having the separate pages would be better for the user. What do you think?
Technical SEO | | Muhammad-Isap1 -
Should I be concerned about Google indexing an old domain if the listings redirect to the new domain?
I noticed this about Moz's old domain SEOMoz.org. If the URLs from the old domain are redirecting, is there any reason to be concerned about an old domain still appearing to be indexed by Google? See here: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site%3Aseomoz.org Links to seomoz.org are listed, but if you click them they redirect to moz.com. Is this anything to be concerned about or is everything operating as expected?
Technical SEO | | 352inc0 -
Concerned about Dup content between old and new website
I have an 8 year old plastic surgery website with my name in the url. I have just released a new website with a generic local plastic surgery url without my name. However my google authorship photo is appearing in listings from both sites with different URLs. So far Google is listing pages from both sites on the same google page result for similar search terms. However I am concerned that eventually I may be punished for dup content since I am the same author for both pages?
Technical SEO | | wianno1680 -
Does 301 redirect of old filenames still work?
I have gone through several revisions of my site. We used to have only static pages in HTML. I had search-engine-optimization.html changed to seo-philippines.html changed to /seo-philippines/ I 301 redirected all of them whenever I change the filenames. This is in the course of 6 years worth of link building and I'm wondering if this has an effect because our rankings go down everytime we do this.
Technical SEO | | optimind0 -
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 -
Changed URL of all web pages to a new updated one - Keywords still pick the old URL
A month ago we updated our website and with that we created new URLs for each page. Under "On-Page", the keywords we put to check ranking on are still giving information on the old urls of our websites. Slowly, some new URLs are popping up. I'm wondering if there's a way I can manually make the keywords feedback information from the new urls.
Technical SEO | | Champions0 -
Should this site start again on a new domain
Hi We have not done SEO on this site they have used another company who looks like they outsourced and the links have been built by a third party all blog networks and this company have said they cannot get the links removed. Google flagged artificial links on this web site in February and in April it lost over 10000 visitors in a month and its just free falled ever since. The categories have been recreated and no redirects created due to the amount of backlinks from the blog sites to the original category pages but the site is not recovering its down to 1500 visitors a month and used to get 14000 a month. So should my customer ditch the domain and move this site to fresh domain? http://www.kids-beds-online.com Any answers would really be appreciated. thanks Tracy
Technical SEO | | dashesndots0