Jump to content

Can I use Wildcard DNS to create subdomain for each my user?


Recommended Posts

Posted

Hi,
 
I just want to automatically create a new subdomain in my domain for users that have registered and redirect it to example his profile (his username as a subdomain ex: username.mydomain.com)
 
I have search tutorials for it and I found to add new A Record that use wildcard for name.
i found in stackoverflow like shown below:

 

CzAe6njjRBO3Deqq_2pb0A.png

Is heliohost support for this?
 
I have setup it as below:
 
this is my A Record
 
uskPU-QvRrOIcUlInU-qbw.png
 
 
and htaccess:

 

JTJgnIV5RPqyl3yhqzx01A.png

 

 

and index file:

 

axjfVHNfQViLkdxpXteRew.png

 

and the result my browser got redirected in this page when I use https:

 

DxqeuhmgQYG59twd4iq-vQ.png

 

and this page when I not use https:

 

WE0JVseCSD_zUInkVEf7Fw.png

 

 

please any solution for this ?

thanks for reading and answering  :)  :)

 

Posted

HelioHost uses cPanel, you'd need to manually add records.

 

I recommend just creating a subfolder.

 

<domain>/~<user>/

 

Wildcard DNS does not exist btw.

Posted
it might could help. but actually i looking for the alternative of it. 
i mean if user register in my site he will have his own profile page address as a subdomain (like user.masaeng.ga) that not created in the cPanel but as another alias of my domain and i can easily costumize what will be dispayed there (and dynamic data such as users data) and does not require me to get into cpanel (also not fulling up my subdomain list in cpanel).
please do you have any solutions for this case? such as directing in htaccess or whatever  :unsure:
 
any help would be helpful for me 
 

 

Posted

its working when i visit as (whatever).masaeng.ga

 

but i not sure it is working properly because when i write php code there, the code was not run (it is displayed on the source page)

 

p-F5JjBmRNWcj00abJdvPQ.png

 

also on that guide the code in .htaccess file in not available. then how i get it such as masaeng.ga/index.php?u=mhari as mhari.masaeng.ga

 

any solution please

Posted (edited)

Hi,,

 

I have tried above guide but i dont know why the php code are not run

 

JMs_ERlITgSm9VXgxrE36w.png

 

so i dont know it work or not. Are there any wrong step I did in creating subdomain ?

Edited by Mhari
Posted

Hi,

HTTPS will be automatically enabled in all domains/subdomain by CPanel AutoSSL, with a certificate issued by CPanel Inc. and trusted by all browsers.

  • Like 1
Posted

I'm not sure how the subdomains are being implemented here. If they're actually being added to cPanel, maicol07 is correct, they'll get a certificate within 24 hours of creation. If they're implemented some other way, they might not.

Posted

Hi, 

 

I am found a problem

 

the urls after the domain are ignored

for example main.masaeng.ga/haha/hihi/huhu/hoho.php will still in main.masaeng.ga/index.php

I mean whatever I write after the domain it would be ignored and show me index.php page.

 

I think this problem appear because something wrong in my .htaccess file

 

here is the file :

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.masaeng\.ga$
RewriteRule .* /index.php?u=%1 [L]

anyone know what the wrong is?

please tell me since I do not really understand the code

thanks in advance  :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...