Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    5

    Default Addon domain redirects to main domain

    I was wondering what im doing wrong in httpd.conf because i have maindomain.com which acts right but when i added addons domains via cpanel they redirects to my maindomain.com. i can access to addon domain files like: maindomain.com/addondomain.com only. in htaccess i have default wordpress configs in it nothing else.

  2. #2
    Member linux7802's Avatar
    Join Date
    Dec 2007
    Posts
    224
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Use following code in .htaccess file present in root of your main domain

    RewriteCond %{HTTP_HOST} ^(www\.)?addondomain\.com
    Rewriterule .* - [L]

    Replace addondomain with your addon domain name and make sure that before browsing addon domain, clear cache from your local machine.
    Regards,
    G R Sonar
    cPanel Hosting Blog

  3. #3
    Member
    Join Date
    Sep 2010
    Posts
    5

    Default

    Quote Originally Posted by linux7802 View Post
    Use following code in .htaccess file present in root of your main domain

    RewriteCond %{HTTP_HOST} ^(www\.)?addondomain\.com
    Rewriterule .* - [L]

    Replace addondomain with your addon domain name and make sure that before browsing addon domain, clear cache from your local machine.
    Still redirects to main domain..

  4. #4
    Registered User
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    1

    Default

    I had the same problem few days ago and it turns out that it was the DNS conf problem. I'm talking here about the domain DNS if you create the addon domain right after you change the DNS addresses you might end up in such situation. Just wait few hours maybe a day and delete the addon domain and create it once more then check if its working. It worked for me.

  5. #5
    Member linux7802's Avatar
    Join Date
    Dec 2007
    Posts
    224
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by prkl View Post
    Still redirects to main domain..

    In that case confirm your addon domain is resolving from correct server with correct document root path. If eevrything is correct then reconfigure addon domain. If you don't mind provied us your addon domain as well as main domain , so that we can check DNS record for you.
    Regards,
    G R Sonar
    cPanel Hosting Blog

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 01-09-2010, 02:33 AM
  2. addon redirects to main domain
    By dan.andrus in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-03-2006, 05:45 AM
  3. HELP! addon domain points to main domain path when browsing
    By SetLar8 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-23-2006, 06:32 AM
  4. Sub domain redirects to the main site???
    By techark in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-16-2005, 07:06 AM
  5. Setting Main Account Domain as Addon Domain (uh oh)
    By Lizardsoft in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-03-2004, 04:23 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube