Joomla showing IP instead of domain name - iis

I am hosting my own website on a Proliant Rack server using Internet Information Services. I have configured everything; port forwards, IIS, and also my Content Management System, Joomla. I have also registered a domain, www.example.com (not the real domain obviously) with godaddy. I have also gone into proliant iLO and I have set the server FQDN to www.example.com. Finally, I forwarded the domain in godaddy to my public ip. However, when I enter in the URL (www.example.com) into a browser (outside of my network), it simply shows my IP address. My host file is as follows:
127.0.0.1 localhost
127.0.0.1 example.com
127.0.0.1 www.example.com
Any help is appreciated. Thanks!

You need to add a site and bind its host name to your domain. Otherwise, IIS doesn't know what the domain point to.

Related

Https issue with subdomain pointing to Azure VM

I have a domain purchased from Godaddy. Then a Virtual Machine setup on Azure with an web application installed on it.
So thus far I have:
An Azure VM with an application running on it, lets say the ip for the VM is 12.3.456.789
A domain name I purchased from godaddy, e.g mydomain.com, I then created a subdomain for e.g sub.mydomain.com
I then added an SSL certificate to this subdomain which worked fine, after I changed the DNS A record for the subdomain to the ip address of the VM 12.3.456.789, also the application on the VM is accessed on port 4000. So https://sub.mydomain.com:4000
The issue is that when I access my domain via https I get the ERR_SSL_PROTOCOL_ERROR in all browsers but when I access it via http then the application on it loads completely fine.
Any ideas on what I would have done wrong or left out in my setup?
Also if I did not provide enough information do let me know.
commercial SSL certs are always signed to include the TLD
(Top Level Domain -> in your hypothetical case: mydomain.com) !
You should contact godaddy to change the certificate to change the SAN (Subject alternative Name to sub.mydomain.com)
One example:
You order a ssl certificate for the subdomain www for your domain mydomain.com.
mydomain.com is valid by its nature (SAN -> it's the TLD)
Whereas www.mydomain.com is the SUBJECT.
Best H.
To rewrite to rule from https as you are getting ERR_SSL_PROTOCOL_ERROR please check you are correctly provided ssl cerficate SSL Certificate Checker as my SSL provided is DigiCert.
And to make Https ensure in your remote desktop in IIS manager click your virtual machine ->binding -> Https and port as 443 and upload certificate.
In your virtual machine try to add outbound security rule provide service as HTTPS and port as same in 443
Reference: https://learn.microsoft.com/en-us/answers/questions/23397/not-able-to-secure-windows-azure-vm-in-https.html

Bypass subdomain limit by hosting own DNS server

The following is more theoretical than practical, I want to test if I have understood the DNS system.
I'm currently renting a domain, lets call it example.com, from a provider.
I also own a server with a static ip.
Using the webinterface of my domain provider, I created an A-Record for my domain to point to my server.
Now everyone pinging example.com will find that A-Record (that should distribute itself to serveral more DNS servers) and thus ping my server.
Now I want a subdomain, which points to a different ip address.
My provider on the other hand won't let me create subdomains.
I can simply host an own DNS server at example.com, where I can add (arbitraryly) many records for any domain that is a subdomain to example.com (so not only subdomain.example.com but also subdomain.subdomain.example.com).
Now, if someone pings subdomain.example.com the following will happen:
They go to their favourite DNS server, which has an entry for example.com by now (due to distribution, see above)
Since there is no entry for subdomain.example.com, the will send an DNS request on udp port 53 to the A-Record ip behind example.com (my server)
My server will reply with the correct ip of subdomain.example.com
They send their ping to the correct ip
Is my understanding correct?
It's not far off, but there are more subtle things under the hood. If you want to host your example.com zone yourself, then you need to have your parent (.com) have NS records that point to your nameserver on your static IP. You would need to register that within your parent through your registrar that you bought the DNS registration with.
.com would need to host:
example.com. NS myns.example.com
myns.example.com. A YOURIP
And in your zone running on your machine, you would need something like:
example.com. SOA ....
example.com. NS myns.example.com
myns.example.com. A YOURIP
subdomain.example.com A SUBDOMINIP
If "subdomain" (your wording) is actually supposed to be in another zone enirely, then you need to use NS/A records to point to its DNS server (which can be the same).
You might go look for a good tutorial about how the DNS works in general. It will take you a lot further.

https://example.com is not getting resolved

I'm supporting a client which is having an issue with their naked domain not getting resolved when requested through https.(https://example.com)
All of these other url are resolved:
http://example.com
http://www.example.com
https://www.example.com
DNS Setup
In their dns settings. The example.com is forwarded to http://www.example.com
A record is not pointing to the actual IP of the web server instead is pointing to the IP of the DNS provider. (I think this is the default when they bought the domain).
CNAME www is then pointing to their Azure DNS hostname (*.cloudapp.net) which contains their company DNS records. (forwarding the request to another name server by CNAME)
What I've tried:
pointed the A record to the correct web server IP and now the https://example.com is getting resolved.
Questions:
Why is the https://example.com was not getting resolved?
Is the CNAME forwarding to another name server a correct setup instead of just changing the name servers to Azure?
Why is the https://example.com was not getting resolved? - This is because the A record has to point to an IP address of the web server pointing it to the IP address of the DNS server is wrong, until you have the same ip address serving http requests and dns requests both.
My guess is that *.cloudapp.net is the domain where the actual application is hosted instead of DNS hostname. A CNAME can point to another hostname is perfectly fine, provided the another hostname resolves to the correct destination server ip address.

When Nameservers are mapped, my domain redirects to the IP provided

I have setup a wordpress website on Digital Ocean. I have domain registered on GoDaddy. I have created domain from Digital Ocean and mapped the name-servers to GoDaddy. But when I enter the url, it just redirects to the IP and IP is shown on address bar instead of domain name.
Is there anything else should I add?
Assuming that You are using DNS servers provided by DigitalOcean and mapped your droplet's IP to your domain, You need to add the following Name Servers in Your GoDaddy Configuration:
ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com
If it is still Redirecting to Your IP address then make sure in Your Apache/Nginx Vhost Block, there is no redirect defined in them.
Also, you are running Wordpress then it is possible that you had set up your site's URL as IP address, it might be the reason for redirect, if it is then make sure to change it from wp-config.php
You can find more info here: https://codex.wordpress.org/Changing_The_Site_URL
Hope this Helps!

Is DNS server And Host file Are different?

I am unsure Whether both DNS server and Host file are the same or different.
I Hosted an application in IIS and created A host name as website1.domain.com and tried to browse it and it didn't work.
When searching on net i found that we need to make entry in DNS server or Host file.
As in most of the sites that I saw mentioned DNS server or host file. I am unsure Whether the both are same or they both are different.
A hosts file is used by Operating Systems to manually specify the IP addresses for specific domains/subdomains - think of it as an override.
DNS however is a server - think of it as a registry - that keeps track of records pertaining to domains, such as A records, MX records etc.
For the purposes of a local test site, an entry in your hosts file would be sufficient, however for a live site, a DNS entry relating to the domain you wish to have your site hosted on would be required.
Choosing which to use comes down to a few things. Does the server upon which your hosting the site use its own DNS server, i.e. a DNS server on the same network, which the connections to the server will be using as well? Does the domain name the site uses have its nameserver set to one that is externally available (i.e. 123-reg.co.uk). If either of these cases are true, you could probably use a DNS server.
If not, is the server hosting the site running on the same machine as the client that will be viewing the site? If so, you can probably use a hosts file, pointing your domains to the localhost IP of 127.0.0.1, ensuring the domains match the bindings in IIS.
Dns server is a server that will help to resolve dns names. ie when you type google.com in your browser , the name will be passed to the dns server provided by your isp. then it will be resolved to ip address by the dns server and your request will be routed to the google ip address by isp network. host file is different one. if you add www.mydomian.com entry in your host file and map it to an ip address 192.168.0.1 then your computer will check ion your host file when you type www.mydomain.com, whether there is any entry for mydomain.com in your host file, and if exists it will be routed to that ip address. in case if there is dns server and you set that server ip in your hnetwork configuration in your pc, then all the domain name request will be sent to that dns server(if there is no host entry exists)

Resources