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
-
Should I set 301 Redirects or keep old permalinks?
I just built a new site for a client and the new site has pretty links like domain.com/about-us. The old site has been around for a VERY long time and had links like domain.com/aboutus. I want to do 301 redirects because from my understanding, it minimizes the negative SEO impact. But the client wants to keep the permalinks without the hyphens to match the old links. What is the best route, considering SEO? BTW, the site is still on the same domain. Thanks in advance for your help! Neik
Technical SEO | | glassh0use0 -
301 domain name to another site
I had 2 websites. I decided not to maintain one of them and set it to 301 to my main website. However, i see people getting 404 errors when they land on my main website but with a page name from the old site. How can I set things so that anyone who tries to go to the old site goes to my homepage of my main site? http://siteA.com http://oldsiteB.com/oldpagename sends them to http://siteA.com//oldpagename = 404 - I want them to go directly to homepage on siteA.
Technical SEO | | bhsiao0 -
Redirect to new domain.... (which is penalised)
Hey - how's things? I have a client who wants to redirect his main domain to a new one.... there are a couple of problems I see and thought I'd ask on moz. 1 - The new domain has been incorrectly parked on the old domain with no redirection in place... when you do "site:domain.com" in Google, there are no serps for the new domain (the old domain still ranks well), it doesn't seem to rank anywhere and doesn't return any results in OSE. Is it wise to redirect to this domain or will rankings drop on both? 2 - The new domain uses .mobi as its suffix and will be replacing a .com - but is much more related to the business keyword wise. Is using mobi a problem. Overall the SEO on the site is abysmal and I will be reworking everything - so there will be lots of changes going on at the same time. I'm just wondering if it is worth redirecting the new domain at all, or trying to get brand new domain and use that.... or just to stick with the original aged domain... I think that is my only concerns at the moment
Technical SEO | | agua0 -
Am I using 301 correctly?
Hello, I have a 'Free download' type site for free graphics for designers. To prevent hot linking we authenticate the downloads and use a 301 redirect. So for example: The download URL looks like this if someone is clicking on the download button: http://www.website.com**/resources/243-name-of-the-file/download/dc37** and then we 301 that URL back to: http://www.website.com**/category-name/243-name-of-the-file** Is a 301 the correct way to do that?
Technical SEO | | shawn810 -
Domain Switch - With lost control of original domain.
Hey all, A client finally sold a domain name after being harassed to sell for many years, without talking to us about it first. They moved the site to a new domain, and the purchasing company took over the original domain. Then they called me, wondering why the site is no longer showing up in Google. I've done some initial research, and everything I find for advice assumes that you have control over the original domain. We don't. I'm hoping someone here has some creative advice, so we don't have to start from the beginning, and/or painfully update links we've acquired. My only thought was that the new company may be kind enough to post 301's for us if we provided them.... Any thoughts / advice / life rings will be greatly appreciated! 🙂
Technical SEO | | KBK0 -
Domain taken. Which is better? Using hypens or longer domain.
I am wanting to set up an e commerce site and the domain name that I want is taken. I am considering using a domain that has the main keyword I want to rank for as the domain. I have heard chatter of google penalizing these types of sites and it seems that it hasn't come about. This is something that I would like to test out. So if "electricscooters.com" is taken, should I use "electric-scooters.com" or "electricscooters4less.com" Just wondering if the hyphenated or the longer domain will rank higher. The site won't be spammy at all, I will carry a few different companies that offer similar products. So for this case, I would only sell scooters from a few different manufacturers. Feedback would be appreciated!
Technical SEO | | Dave_Whitty0 -
Redirecting a old aged site to a new exact match site?
Hi All, I have a question. I have 2 sites with me in the same sector and want some help. site 1 is a old site started back in 2003 and has some amount of links to it and has a pr 3 with some good links to it but doesn't rank much for any keywords for the timing. site 2 is a aged domain but newly developed with unique content and has a good amount of exact match with a .com version. so will there be any benefit by redirecting site 1 to site 2 to get the seo benefits and a start for link bulding? or is it best to develop and work on each site? the sector is health insurance. Thanks
Technical SEO | | macky71 -
Why Google did not index our domain?
Hi, We launched tmart 60 days ago and submitted to google, bing, yahoo 20 days later. But google had never indexed our website still when yahoo indexed it in one week. What we have checked or tried: 1. We got 20~50 inlinks in one month and now 81 inlinks via yahoo site explorer. 2. This domain has registered for 13 years and we purchased it from sedo last year. We
Technical SEO | | zt673
did not find any problems from domain archive pages. 3. Page similar: the homepage is 50% similar to one of our competitors when we just launched.
So we adjusted the page structure and modified the content one month later and decreased the similarity to 30% (by tools from webconfs.com) 4. Google Robots: googlebot crawled our website every day after we submitted for indexing.
We opened GWT account for it and added the xml sitemap last week. GWT said nothing
was wrong except the time of page loading. Our questions: Why google did not indexed our website? What should we do? Thanks, wu0