Redirect IP to domain issue - ssl

I have following domain name air8kissen.de. When I type in that domain name in browser it gets redirected to its IP address 178.128.117.168. The problem is that I setup SSL for domain name and since IP dont have SSL it shows the warning sign. When I accept to risk visiting the website, it redirects me to my domain name.
I have setup all necessary CNAME and A records inside Digitalocean domain setup and have no idea why it shows the IP address first time I visit to domain.
What should I do to fix this?
Cheers

This is not a DNS or SSL issue, You need to setup the Virtual Host for your domain at your webserver, and check any redirection rules placed at your webserver level.

Related

(Cpanel Centos 7.2) Prevent external domain to access my domain just by pointing ip address

I have a user account with dedicated ip address on cPanel (WHM) and a website e.g. www.domain1.com is running on that. If i use same ip address to point some external domain www.domain2.com to that account ip without adding it as addon domain, it serves the website present on that ip (www.domain1.com) on www.domain2.com. How can I restrict that if possible?
You can't really 'prevent' it - for example, I could buy a domain name and point it at your website.
However, what you can do is add a 'redirect' to your site. So, if the domain used to access your site is not your domain, then redirect the client to your domain name
I don't really know cPanel, but this appears to be what you want
https://documentation.cpanel.net/display/ALD/Redirects

DNS entry for third level domain

I am trying to create a third-level domain virtual host on my server. I hope the configs are set up correctly, but I am getting a ERR_NAME_NOT_RESOLVED error.
I have read that I have to "add DNS entry" somewhere so that the name would get resolved, but how do I do that? Where do I do that? The server is running on Ubuntu .
I suppose you get that ERR_NAME_NOT_RESOLVED error from Chrome. This means that Chrome is unable to find the subdomain in DNS.
You are correct, registering your subdomain in DNS will require DNS changes. Specifically, you have to add a DNS A resource record for your subdomain to become "visible" to browsers over IPv4. For IPv6, add an AAAA, too. Both record types point to an IP address and it will be the IP address of your web server. (Technically, you can also use a CNAME type record, but make sure to read up on how that works.)
Subdomain DNS will be served by the authoritative DNS servers for your domain, so you can register the required record(s) through your DNS service provider. If you are not sure who they are, look up the NS records for your domain, this will give you the list of authoritative name servers for your domain and you can work from there.
I understand you have already configured your Apache to work with the subdomain, so setting up DNS completes the setup process.

SSL at the root domain on heroku

I've got a website with an SSL certificate for the root domain only - example.com.au
The site runs on heroku with the dns at dnsimple.com
I want all requests to www.example.com.au to go to the canonical url, ie to example.com.au and obviously this redirection needs to be set up at the dns level so that the user doesn't get stopped with an "insecure" message.
What should i put in my DNS?
I want all requests to www.example.com.au to go to the canonical url, ie to example.com.au and obviously this redirection needs to be set up at the dns level so that the user doesn't get stopped with an "insecure" message.
In short: This is not possible, because aliases at DNS level will not change the hostname.
In detail:
If the user types in www.example.com the client (i.e. the browser) will lookup the IP for this host and it will follow any DNS aliases (like a CNAME pointing to example.com) during this process. But, following DNS aliases will not cause redirects inside the browser. Instead the name in the URL will stay the same and so will be the name used to verify the certificate.
This means there is no way to do what you want at the DNS level. If you want to redirect from https://www.example.com to https://example.com you must have a certificate matching www.example.com.

Virtual Hosts redirecting to ip address

I have multiple domain in one ip address.One is Magento and another is normal html site.I set up virtual hosts in Nginx configuration but then only when I access to my Magento site (xxx.com) it automatically redirects to ip address.
How can I stop showing my ip address and keep my domain in the browser?
Your config is OK. Redirect probably comes from Magento engine.

Heroku SSL DNS Settings

I am using Namecheap for domain registration and for DNS, and using Heroku for hosting. I have purchased an SSL certificate through Namecheap and set it up with Heroku, and have it nearly working perfectly.
Currently, I have a DNS CNAME record with host "www" pointing to "[whatever].herokussl.com.", and a "#" host record set to URL Redirect (301) to "http://www.[domain].com".
My app itself forces all HTTP traffic to redirect to HTTPS, so "http://www.[domain].com" goes to "https://www.[domain].com".
I am getting the following results:
http://www.[domain].com - properly navigates to site as HTTPS
https://www.[domain].com - properly navigates to site as HTTPS
http://[domain].com - properly navigates to site as HTTPS
https://[domain].com - **does not** navigate to site, and instead the browser cannot find the page
I believe this has to do with how the URL Redirect behaves behind the scenes. I had originally done this as CNAME record pointing directly to "[whatever].herokussl.com.", but apparently doing that on the zone apex blocks MX records...
What do I need to do to get the desired behavior? I simply want all naked or "www" domains to point to my "www" domain.
UPDATE: More information regarding my DNS settings
HOST NAME IP ADDRESS/URL RECORD TYPE
--------- -------------- -----------
# http://www.[domain].com URL Redirect (301)
www [whatever].herokussl.com. CNAME (Alias)
My SSL certificate was not a wildcard, just an EssentialSSL certificate from Comodo. I'm fine if only www.[domain].com works (with a redirect from the naked domain), although when I was using a CNAME for both the apex and "www", it was working as a naked domain with SSL just fine.
If you use DnsSimple, you can use their ALIAS record feature.
The DnsSimple ALIAS record is not a standard DNS record type, and is not the same thing as a CNAME record. Rather, DnsSimple supports it in a special way, by performing the DNS resolution for you and returning to your browser the results. This is different from all other DNS records, where the DNS server performs no processing but simply returns the record to your browser on-demand.
There may be other DNS vendors with their own similar features.
However, with only vanilla DNS, HTTP-only 3xx's from your nameserver, and Heroku, there is no way to get SSL to the zone apex (the domain name with no www.).