Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i want to create a dynamic subdomain

i have done this CNAME

*.domainname.com 14440 in <IP>

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domains\.com$ [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.domain\.com$ [NC]
RewriteRule (.*) /site.php?url=%1&path=$1 [L,QSA]

but it's gives me a cpanel home page Great Success ! Apache is working on your cPanel® and WHM™ Server

can you help me where i am wrong.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The "Great Success" page is probably your default VirtualHost in apache. If your dynamic subdomain (and your main domain) is all you are hosting, just make that your default host. Otherwise, you will need to update settings for your VirtualHost accordingly:

<VirtualHost example.com:80>
ServerName: example.com
ServerAlias: *.example.com

That should hopefully fix the issue. There is some additional info (for slightly more complicated virtualhost setups) at: http://httpd.apache.org/docs/2.0/vhosts/mass.html in case you decide to tweak it even further.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.