How to point a domain name to specific subdomain on Windows Server - windows

I have purchased a domain name (https://example.com) from namecheap. I have a subdomain (https://subdomain.go.com:444) running on specific port on windows web server. If someone visits (https://example.com), I would like him to land on my subdomain (https://subdomain.go.com:444). How can I achieve this?
I have tried URL redirect record in DNS settings on namecheap but that did not work.
Type : URL Redirect Record
Host : #
Value : https://subdomain.go.com:444
I also want the address to show as example.com instead of https://subdomain.go.com:444 in my browser(masking).
*** ref:- https://www.namecheap.com/support/knowledgebase/article.aspx/9678/2237/how-to-redirect-subdomain-to-a-certain-ip-address-along-with-a-port/

Related

Subdomain reroute to domain

I have created a web app using Laravel 8 and is hosted on Server A using domain name 'myapp.com'. I have applied a wildcard subdomain eg: 'myweb1.myapp.com' and 'myweb2.myapp.com' for one of the app features.
I then purchased a domain 'myweb1.com' from Server B which I intends to reroute it to 'myweb1.myapp.com'. How do I achieve this?
So, when 'myweb1.myapp.com' is entered the URL will reroute to 'myweb1.com'. And 'myweb1.myapp.com/product' will be 'myweb1.com/product'.
Do I need to change the nameservers for 'myweb1.com'? Do I need to change .htaccess for it? What if I only purchased a domain without a hosting which I can't edit .htaccess? Can I achieve this? And are there any specific term for I want to do?
you can do it with reverse proxy.
if your web server is nginx: https://stackoverflow.com/a/14352958/5987259
if your web server is apache: https://stackoverflow.com/a/52286695/5987259

Custom domain(Hostiner) in heroku not working without www

Recently i have purchase domain from hostinger and using heroku hosting but some how my domain working only with www. when i try to access url like example.com it shows me hostinger page.
i have tried follwoing name as domain name in heroku custom domain setting.
www.example.com
example.com
*.example.com
and tried using dns target of above url in my hostinger domain setting in CANME but its still not working.
what should i put in hosts part of hostinger and where its should be exactly pointed to.
Please help me to solve the error...

How to redirect my naked domain to https://www.mywebsite.com with Google Domains and Heroku?

I host my website on heroku and my domain is managed by google domains.
I have successfully linked my domain to my heroku app. However, to go to my website, people are forced to type the exact domain www.mywebsite.com . If someone just type mywebsite.com there is an http error.
I'm searching on both google & heroku docs but i don't find anything related to this . All info i found are about subdomains.
Any idea for redirecting all http/www typo to my www.mywebsite.com ?
At the core, keep in mind that example.com and www.example.com are 2 different hosts that can resolve to different IPs. Your DNS settings at Google Domains handles this. Either direct both of them to Heroku or simply direct "www" to Heroku via the CNAME record that they give you and then use Google Domains forwarding feature to forward all non-www traffic to www.example.com.
In the Synthetic records, choose Subdomain forward, fill # in Subdomain, then www.yourdomain.com in the Destination URL, also choose Forward path and then ADD

How to add an addon domain to cpanel with same name but different tld?

I have a cpanel account with option for unlimited add-on domains. I have added a domain, say, example.org. For this, cpanel has also created a sub-domain for main hosting domain example.main-domain.com.
Now I have purchased another domain example.com. When I try to add it through addon domains option, cpanel gives an error that subdomain example.main-domain.com already exists.
Is there a way to add the second domain in this scenario?
The first part of the subdomain is determined by the Subdomain or FTP Username: you set when you add the subdomain.
Cpanel auto-fills this field with the first part of the domain name but you can enter anything you like.
So when you go to add example.com Cpanel will auto-fill the Subdomain or FTP Username: to example and try to create the subdomain example.main-domain.com which already exists from when you added example.org in the same way so it will throw an error like
(XID bqnr82) A DNS entry for the domain “example.main-domain.com” already exists.
Instead when you add example.com enter any unused value into the Subdomain or FTP Username: field, such as exampledotcom and the subdomain cpannel creates will be at
exampledotcom.main-domain.com
This is explained and discussed here
https://forums.cpanel.net/threads/addon-domains-differing-only-in-tld-extension.249141/
You can edit the sub-domain name to example1 while adding the other domain example.com. So, that the next sub-domain will be example1.main-domain.com.
When you create addon domain it also creates subdomain for the addon domain. Now you since create subdomain with name example already so when you attempt to add addon domain with name example.com it could not create subdomain example since it was already added. Just rename already created subdomain and attempt to add the server. It will fix the problem.

Custom Domain pointing to heroku app changes URL in browser?

I have an website hosted on heroku. App url is like example.herokuapp.com
I bought domain with name www.example.com and on visiting this URL I pointed to example.herokuapp.com. This works fine however URL in browser changes to heroku app rather it should stay custom domain www.example.com
What configurations are required?
That suggests you're using domain forwarding at your DNS provider and not adding a CNAME entry to your domain pointing at example.herokuapp.com for the www host

Resources