Results 1 to 9 of 9
Hybrid View
-
09-29-2009, 11:49 PM #1WHT Addict
- Join Date
- Dec 2005
- Location
- South Wales, UK
- Posts
- 152
Cpanel Parked Domains Problem / Htaccess Rules
Hi all,
We recently migrated to WHM/Cpanel from Directadmin.
We have domain.com as the primary domain for the site the site in question.
With DirectAdmin it allowed "Domain Pointers" (aka Redirects) to be pointed at the domain.com. We own domain.org/.net/.co.uk which all were simply pointed at domain.com so when someone visited www.domain.co.uk it redirected to www.domain.com
When we started up with Cpanel we used the "Park Domain" option which unfortunately has simply mirrored the site. e.g.
If someone visits www.domain.co.uk it remains as domain.co.uk/page.html rather than redirect to www.domain.com/page.html
As a result, Google et al have picked up both domains/sites and we are getting penalised for duplicate content.
I am assuming the best way to tackle this is to generate rules within htaccess to solve it.
I have tried several combinations of htaccess rules to permenantly redirect any visitors who come to the site from www.domain.co.uk so it simply redirects them to www.domain.com but I haven't been able to get any to work. Some I've tried:
Code:RewriteCond %{HTTP_HOST} ^domain.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.co.uk$ RewriteRule ^(.*)$ "http\:\/\/www\.domain\.com$1" [R=301,L]
Code:redirectMatch 301 ^(.*)$ http://www.domain.co.uk redirectMatch permanent ^(.*)$ http://www.domain.com
Code:Redirect 301 http://www.domain.co.uk http://www.domain.com
What I need to do of course is preserve the entries within the search engines. So for example any entries that are present for www.domain.co.uk/about-us.html need to be redirected to www.domain.com/about-us.html
If anyone could help that would be great.
ThanksIt can only be attributable to human error.
-
09-30-2009, 12:34 AM #2Junior Guru
- Join Date
- Oct 2008
- Posts
- 184
301 redirect is the most efficient and Search Engine Friendly method for webpage redirection and this can be set up via cPanel in this way:
1. Log in to you cPanel
2. Under "Domains" go to "Redirects"
3. Set Type as "Permanent (301)"
4. Select your domain from the drop down menu
5. Leave the text box after "/" blank
6. Set "redirects to" to your new domain e.g. http://newdomain.com/ (remember to put http:// and a trailing "/")
7. Set "www redirection" to "Redirect with or without www."
8. Check "Wild Card Redirect"
9. Click on "Add"
If you can't see your domain in the drop down menu then first go to Domains -> Addon Domains/Parked Domains (any of the two will work) and add your domain there.
Hope this helps!
RegardsLast edited by saadsalman; 09-30-2009 at 12:43 AM.
-
09-30-2009, 12:37 AM #3Junior Guru
- Join Date
- Oct 2008
- Posts
- 184
Still if you want to do this via htaccess then the following should be the contents of your htaccess file:
RewriteEngine ON
RewriteRule ^(.*)$ http://mynewdomain.com/$1 [R=301,L]
-
10-03-2009, 10:40 PM #4Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 38
what bout google webmaster tools redirect tool?
-
10-05-2009, 06:59 AM #5Junior Guru
- Join Date
- Oct 2008
- Posts
- 184
-
10-05-2009, 02:37 PM #6Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 38
-
10-06-2009, 09:52 AM #7Junior Guru
- Join Date
- Oct 2008
- Posts
- 184
-
10-09-2009, 10:36 PM #8WHT Addict
- Join Date
- Sep 2009
- Posts
- 136
A well-defined domain name can provide tremendous advantages for an online business, including the added benefit of boosting performance in the search engines.
Simple, easily-recognized domains convey professionalism and trust to search engine users.
-
01-31-2013, 07:19 AM #9New Member
- Join Date
- Mar 2012
- Posts
- 2
Thanks alot saadsalman the corerct answer is yours
Similar Threads
-
Problem with Addon Domains moving to parked?
By Stranger in forum Hosting Security and TechnologyReplies: 5Last Post: 06-04-2008, 12:30 PM -
cPanel, Addon Domains + Parked Domains
By _mediapig_ in forum Hosting Software and Control PanelsReplies: 8Last Post: 05-02-2008, 12:57 PM -
Addon vs. parked domains in cPanel.
By Stan Marsh in forum Hosting Software and Control PanelsReplies: 2Last Post: 10-01-2006, 04:51 AM -
cPanel and Parked Domains?
By KGIII in forum Web HostingReplies: 5Last Post: 06-03-2006, 03:22 PM -
Google Adsense rules in parked domains
By fischermx in forum Domain NamesReplies: 6Last Post: 11-09-2004, 01:06 PM