title: cPanel/WHM configuration for a COM tld domain
body: <p>I created a VPS running WHM/CPanel on CentOS 6.3 with latest version of WHM and for example my domain names are domain1.com and domain1.co.uk, with ENOM I registered two nameservers for domain1.com; these being ns1 and ns2 = both domains nameservers are set to the registered NS's and they resolve fine.</p>
  
  <p>We created an account in WHM for the .CO.UK domain and this works perfectly, the setup for WHM is setup to point to ns1 and ns2 and the hostname of WHM is ns1.domain.com.</p>
  
  <p>The problem I have is that when navigating to the .COM domain I receive the following error: Executing in an invalid environment for the supplied user. Essentially I want both domains to be exactly the same - I considered logging into domain1.co.uk cPanel and adding .COM as an parked domain but believe this would cause issues if Wordpress was installed on the .co.uk domain and so I didn't do that, I didn't implement addon domains because I was worried it'd cause DNS issues.</p>
  
  <p>I SSH'd into my VPS and tried placing a htaccess file in public_html for the root domain hoping that this would work - however it does not appear to make any difference and I am 100% confident the htaccess file is correct - a 301 from .com to .co.uk.</p>
  
  <p>Does anybody have any suggestions in order to ensure both domains work correctly - I tried adding an account in WHM for .com but of cause it wouldn't let me because the DNS zone already exists as ns1.domain1.com is the DNS controller for everything.</p>
  
  <p>I meant to mention also, if I navigate to the IP address of my VPS I get a web page returned an the URL will be <a href="http://myipaddress/cgi-sys/defaultwebpage.cgi" rel="nofollow">http://myipaddress/cgi-sys/defaultwebpage.cgi</a> but browsing to domain1.com it again tries to redirect to /cgi-sys/defaultwebpage.cgi but instead of returning the same page it returns the error. Browsing to ns1.domain1.com works however I can't test the HTACCESS until Monday.</p>
  
  <p>Thinking about it - should my WHM hostname be domain1.com and not ns1.domain1.com?</p>
  
  <p>Thanks very much.</p>