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
-
New Magento store, is better to place it in a new url or it can work fine in a subdomain?
Hi friends, We are working on a new Magento store for one of our websites. Our strategy is for organic positioning of the products, so we need to understand if the Magento products will position better if the system is hosted in a subdomain of the main company domain or if it is better to host it under its own domain. Thanks,
Technical SEO | | FWC_SEO0 -
I have a sub domain that has live content on it but the root domain redirects to another URL. I know this is not great but what are the implications?
I have a subdomain that is populated and has content. The root domain that the sub lives on redirects to an entirely different URL. I am trying to make a case as to why this isn't great besides the fact that it is just weird user experiences. What are the SEO implications etc. Would any equity that gets built up on the subdomain get passed along in the redirect? Or will there be indexation issues with Google? Cheers, Mark
Technical SEO | | mjsikorsky0 -
Forwarding kw rich domains to main domain
Hi My client has a clutch of kw rich domains that want to point to main domain, apart from being good for promotional reasons is there any seo benefit for doing so (i know there used to be years ago but under impression hasn't been any benefit for a long while) Most importantly though can any bad come from doing this ? Best Rgds Dan
Technical SEO | | Dan-Lawrence0 -
301 redirect new site design
Hi I'm just setting up some 301 redirects for a new site design about to go live. The old site structure had some 'overview' pages in the urls (without any content) that just 302'd to a sub page. Do i need 301 redirect these overview page urls or since they had no content theres no need and I probably shouldn't or should i ? Also for pages that have no direct equivalent replacement is it still best to 301 to nearest relevant page or just leave it. For example a thank you page that currently shows after user submits email form wont be on new site (since message shows on form page after submission rather than new page). Should i 301 to form page or just leave it ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
Best practice for eCommerce site migration, should I 301 redirect or match URLs on new site
Hi Guys, I have been struggling with this one for quite some time. I am no SEO expert like many of you, rather just a small business owner trying to do the right thing, so forgive me if I say something that makes no sense 🙂 I am moving our eCommerce store from one platform to another, in the process the store is getting a massive face lift. The part I am struggling with is whether I should keep my existing URL structure in place or use 301 redirects to create a cleaner looking URLs. Currently the URLs are a little long and I would love to move to a /category/product_name type format. Of course the goal is not to lose ranking in the process, I rank pretty well for several competitive phrases and do not want to create a negative impact. How would you guys handle this? Thanks, Dinesh
Technical SEO | | MyFairyTaleBooks0 -
301 redirecting old content from one site to updated content on a different site
I have a client with two websites. Here are some details, sorry I can't be more specific! Their older site -- specific to one product -- has a very high DA and about 75K visits per month, 80% of which comes from search engines. Their newer site -- focused generally on the brand -- is their top priority. The content here is much better. The vast majority of visits are from referrals (mainly social channels and an email newsletter) and direct traffic. Search traffic is relatively low though. I really want to boost search traffic to site #2. And I'd like to piggy back off some of the search traffic from site #1. Here's my question: If a particular article on site #1 (that ranks very well) needs to be updated, what's the risk/reward of updating the content on site #2 instead and 301 redirecting the original post to the newer post on site #2? Part 2: There are dozens of posts on site #1 that can be improved and updated. Is there an extra risk (or diminishing returns) associated with doing this across many posts? Hope this makes sense. Thanks for your help!
Technical SEO | | djreich0 -
301 or a 404
Just had a discussion with a collegue about a page on our own website. We have some cases which are outdated. These pages receive some visitors but they arrive there when they search for the clients brand name, so for us they are irelevant. What's the best way to handle these kind of pages? Is a 301-redirect to the showcase overview the way to go or do we make it a 404 and include the showcase overview in this 404?
Technical SEO | | nvs.nim0 -
301 redirect issues
Hi all, I'm hoping someone will be able to help me with an extermley frustrating problem with 301 redirects in .htaccess. Basically I'm trying to redirect some old pages (from our old website) that stil rank to the new equivilent. For example - old url = www.domain.com/frames/news/company-news/news-reader.php?newsStoryID=395 New www.domain.com/news/article-title I've tried the simple redirect 301 /frames/news/company-news/news-reader.php?newsStoryID=395 http://www.domain.com/news/article-title But this doesnt work. I've also tried - RewriteEngine on
Technical SEO | | EclipseLegal
RewriteCond %{QUERY_STRING} ^newsStoryID=395$
RewriteRule ^/news-reader.php$ http://www.domain.com/news/article-title/? [L,R=301] Could anyone help? I've followed lots of tutorials that all match the above but it just doesn't work! The only other thing within the htaccess file is from wordpress for pretty permalinks - BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress Many thanks in advance!0