IIS website redirect HTTP to HTTPS for a specific domain - iis-8

I have one website on IIS 8. The trick is that I have multiple domains connected to this website. I have certified one of them so far. Because of this, I can't just redirect all HTTP to HTTPS. This is my attempt at doing the redirect to HTTPS for a specific domain. It does not work. Its not common to not do all or nothing for the redirect so there isn't many resources for this online.
Thank you for the help! Example1
Example2

Related

Unable to enforce https for github pages with Godaddy domain

GH-pages tells me the domain is not eligible for HTTPS at this time. I am wondering how do I enable this with a Godaddy purchased domain? My site is connected and running properly, but I cannot get HTTPS to work. I have also checked that there are no mixed-asset types in my index.html
I figured out that in the DNS records that are automatically configured with the GoDaddy domain, you must remove that A Record that has the value of park.

how to redirect from one https domain to another https domain

I am trying to redirect from an old domain to a new domain using a DNS redirect, but https protocol refuses to redirect to the new site. What is the best solution for this problem ?
Is the only way to handle this kind of redirect within the application code on the server?

Subdomain redirect for API setup

I want to host my API application in a separate server and route it through subdomain fo example api.example.com. My domain is hosted at HostGator. I have created a subdomain and redirect it to the API server by providing the IP address.
The application is written in Codeigniter for RestAPI. Whenever I call any API method by referring the subdomain it shows 404 error (api.example.com/myclass/myfunction), but if I access the same API using a direct link (192.0.2.1/myclass/myfunction) by providing the IP address of the server, it is returning correct result.
Please suggest any configuration change needed.
You can add A record on sub domain, if application is hosted on port 80.
You can simply add A RECORD as
192.0.2.1 api.example.com
You should have option to create DNS zone on hostgator.

Subdomain working fine with http and not working with https

Recently I have installed ssl certificate on my website. After the ssl certificates have been installed ,I found that my subdomain is not working properly. I will address my subdomain as 'xxxx'and main domain as 'primary'. The main domain works well with http as well as https. Now the subdomain works well with http, but with https://xxxx.primary.com delivers me the main site content and not the content of subdomain. I'm using apache server, linux operating system.
Can anyone please help to solve this issue?
Thanks in advance.
This is how SSL protocol works with the browsers. Whenever browsers receive HTTPS request for domain name, it first checks with the server then delivers the site's content. If a website on server has enabled SSL accessed with HTTPS, browser will try to make secure connection and send request to the server.
In your case, your main website is working properly with HTTP as well as HTTPS and delivers proper content, but your sub-domain is not showing proper content for HTTPS. In order to deliver proper content you should consult with your development team. You can better host your sub-domain on another server or you can protect your sub-domain with valid separate SSL certificate.
Suggestion: If you own multiple sub-domains then it is advisable to use Wildcard SSL, that can protect unlimited number of sub-domains with single certificates. Please note, this unlimited does secure first level (blog.domain.com), doesn't second-third-fourth-etc. level (news.blog.domain.com, 1.news.blog.domain.com or abc.1.news.blog.domain.com).

Apache Https to Http Redirect

I currently have a website that use to have an SSL so the web address started with https://
I moved the website to a new server and platform which doesn't have an SSL so the web address starts with http://
I have inbound links going to the https address that I am wanting to redirect to the new website http url. Is this possible without me having to reinstall a new SSL on the new server? Is so, what could a possible solution be?
I have searched and found some promising stuff, but nothing worked. The hosting account is running on Cpanel v11.38.2 and Apache v2.2.23. Thank you for any insight, it is greatly appreciated!
Regards
To accept an HTTPS connection even only to return a redirect, you must still accept HTTPS connections in the first place, which means you need HTTPS installed and turned-on, either with a real certificate or a self-signed one.
For details on how to achieve the actual redirection, perhaps this question can help you: How do you redirect HTTPS to HTTP?