elishacloud / Silent-Hill-2-Enhancements

A project designed to enhance Silent Hill 2 (SH2) graphics and audio for the PC. It also includes scripts to build or modify SH2 audio files (SFX, BGM and Dialog).
http://www.enhanced.townofsilenthill.com/SH2/
zlib License
595 stars 42 forks source link

SSL/TLS Certificate? #212

Closed Iglum closed 3 years ago

Iglum commented 4 years ago

Why not get a free SSL/TLS Certificat from Let's Encrypt for the website ?

image

Polymega commented 4 years ago

Good suggestion. I'll look into this at a future date. Thanks for the links!

Polymega commented 3 years ago

Added.

AeroWidescreen commented 3 years ago

I can't connect to the website anymore. I get an SSL verification fail on both Chrome and Firefox.

https://www.isitdownrightnow.com/enhanced.townofsilenthill.com.html

Polymega commented 3 years ago

Can you clear your cache and ensure you're going to https and not http? I have a .htaccess file to ensure you automatically get redirected to https from http.

I'm able to connect from my desktop, laptop, and phone.

Also, I'm sure you did, but be sure to put the /SH2/ at the end of the URL. I currently have no landing page for just enhanced.townofsilenthill.com.

AeroWidescreen commented 3 years ago

Can you clear your cache and ensure you're going to https and not http? I have a .htaccess file to ensure you automatically get redirected to https from http.

I'm able to connect from my desktop, laptop, and phone.

Also, I'm sure you did, but be sure to put the /SH2/ at the end of the URL. I currently have no landing page for just enhanced.townofsilenthill.com.

Yeah, okay, that fixed it. Looks like the Google link is what's broken. It doesn't like the "www." before the URL.

URL: https://enhanced.townofsilenthill.com/SH2/

Google URL: https://www.enhanced.townofsilenthill.com/SH2/

Polymega commented 3 years ago

I'm not sure what's up. These redirect correctly:

http:// http://www.

But not https://www.

I'm using a wildcard SSL so https://www. should work fine anyway. This is new territory for me. I don't have a solution for this just yet.

elishacloud commented 3 years ago

This is a fairly common problem. Redirection is done using HTTPS and your certificate probably only supports the domain "enhanced.townofsilenthill.com". When someone goes to https://www.enhanced.townofsilenthill.com/ the certificate check fails so they cannot connect therefore they cannot get redirected.

See this page for more details: https://news.constellix.com/http-redirects-with-dns-and-why-https-redirects-are-so-damn-hard/

There are a couple of solutions:

  1. Use a certificate that supports both domains "enhanced.townofsilenthill.com" and "www.enhanced.townofsilenthill.com".
  2. Update the DNS settings so that the DNS will do the redirection, not all DNS servers support this. Here is how you do this with Google DNS: https://support.google.com/domains/answer/4522141
Polymega commented 3 years ago

I've contacted my hosting provider. What a terrible 1.5 hour process that was. They do not offer SSL for 4th-level subdomains. (www + enhanced + townofsilenthill + com = four level subdomain.)

Because of this SSL policy, web browsers immediately reject a subdomain connection to https://www., therefore it won't ever access my .htacccess file that would redirect any https://www. requests to just https://.

I may just cancel this altogether. There's no ads, no credit card info, and no user passwords on the site. It's not essential to have for the page. (I'm frustrated.)

Polymega commented 3 years ago

This will redirect to https:

This will not redirect or work:

I can't do much more about it so long as I want to use subdomains. If the user doesn't add "www" to the address it should be fine. My hosting provider won't offer any further help on this, either.

AeroWidescreen commented 3 years ago

Assuming nothing else can be done, I agree with the idea of cancelling it. I think this will only make it more difficult to find the website.

When I couldn't connect, I thought the website had gone down. I only came here after the entire day had gone by and I knew something was wrong.

https://www.enhanced.townofsilenthill.com/SH2/ http://www.enhanced.townofsilenthill.com/SH2/ www.enhanced.townofsilenthill.com/SH2/

There could be articles or social media posts that use these links, and if someone tries to Google it then they won't be able to connect either.

elishacloud commented 3 years ago

You could transfer the domain name to Google Domains. Google Domain supports redirection of HTTPS traffic and is fairly inexpensive. You should be able to still keep your hosting service, it's just that Google Domain would handle the DNS lookup part.

Polymega commented 3 years ago

Does Google Domains also offer the SSL? I couldn't readily find information on that. That's the main problem is that my hosting provider's SSL doesn't go four subdomain levels deep. The other concern is I really don't want to spend any more than I have to; none of my sites are for-profit/make money, so I'd rather not increase my monthly expenditures.

Anyway, funny enough, trying to resolve this, I noticed a video game I play has the exact same issue with any subdomain they use:

Works: https://forum.deadbydaylight.com/en/ Doesn't work: https://www.forum.deadbydaylight.com/en/

elishacloud commented 3 years ago

Does Google Domains also offer the SSL?

Yes, we have this same setup on our web site at work. The "www.enhanced.townofsilenthill.com" domain would be hosted by Google with a Google cert. When a user goes there Google would redirect them to "enhanced.townofsilenthill.com". This is all part of the Google domain service.

See the "Forwarding over SSL" section at the bottom under this link.

Polymega commented 3 years ago

Thanks Elisha. Tomorrow I may have some general follow-up questions for you I'd send through email, if that's alright.

elishacloud commented 3 years ago

That's the main problem is that my hosting provider's SSL doesn't go four subdomain levels deep.

I doubt this. I think the guy you talked to at your provider is wrong. Check out this page for more details.

These support guys get monitored for how long they take to solve a problem. The more problems they can solve in one day the better stats they get. Sometimes for tough issues they just say something like this to get you off the phone and close the case. I used to work in support... I would ask them for public documentation stating this issue that was written some date previous to today. If they really did not support 4 level domain why did it take 1.5 hours to tell you that? They should have told you that when you first called.

web browsers immediately reject a subdomain connection to https://www.

The reason the web browser rejects the subdomain is because the SSL cert that was installed does not support that domain, not because it is a four level domain. Since the SSL cert is not valid for that domain the web browser refuses to connect. Web browsers are coded to only connect to HTTPS sites if the SSL cert is valid.

Anyways, it is a moot point with Google Domains because Google would be hosting the "www.enhanced.townofsilenthill.com" web site, not your provider. Your provider would only be hosting the "enhanced.townofsilenthill.com" domain. So it really does not matter if your provider supports four subdomain levels or not.

Tomorrow I may have some general follow-up questions for you I'd send through email, if that's alright.

Sure, no problem.

BTW: the whole website seems down right now. Looks like DNS is not resolving.

elishacloud commented 3 years ago

Anyway, funny enough, trying to resolve this, I noticed a video game I play has the exact same issue with any subdomain they use:

Works: https://forum.deadbydaylight.com/en/ Doesn't work: https://www.forum.deadbydaylight.com/en/

This also is a DNS issue. It looks like they never added "www.forum.deadbydaylight.com" to their DNS server.

image