CNAME(alias) for hostname

Questions and discussions about Indie Computing's UBOSbox
Post Reply
criky
Posts: 31
Joined: Fri Jul 05, 2019 4:24 am

CNAME(alias) for hostname

Post by criky » Tue Jul 30, 2019 2:58 am

Hi. :)
I set up my site with my domain name, but CNAME record configuration of my domain registrar does not seem to work with my UBOSbox.
That is to say, my site seems only accessible with the exact host name which I used when I created my site on the box.

For example if I have made my host name as "mydomain.com", then it is only accessible by the exact name of "mydomain.com", even though I have CNAME record(alias) of "www" point to "mydomain.com", which means "www.mydomain.com" can not be accessible by the public internet and only shows the below screen.

I am just trying to install the app "redirect" but I have no idea how to do that with this app for this matter.

My objective :
creating my site with host name of "mydomain.com", when others try to reach my site with the address "http://www.mydomain.com" then it redirects automatically to the "http://mydomain.com".
(my domain registrar CNAME configuration works well for their shared hosting service, if registrar has arguably applied this config correctly, then can UBOS handle the rest of it for redirecting? but normal way of modifying “.htaccess” appears to be impossible)
Attachments
1.png
1.png (14.89 KiB) Viewed 113 times



criky
Posts: 31
Joined: Fri Jul 05, 2019 4:24 am

Re: CNAME(alias) for hostname

Post by criky » Tue Jul 30, 2019 8:30 am

Hey, I resolved this matter.
The key is to create independent "www" site with redirect app which points to the non-"www" site(my main site).
It works well with the registrar's configuration of CNAME(alias) record.
Please note this way is quite different from the conventional one which describes only the modification of the ".htaccess" file, but that measure is not allowed with the default UBOS permission. I found UBOS app is much easier than any other way.

I'll just keep this post for anyone who wants to have help in the future. :)

Thanks.

Post Reply