URL redirect to port - url

I have set up SAB, Sickbeard, CouchPotato & Plex on my home media server. All mapped to respective ports.
The ports have been forwarded correctly and I have DDNS enabled, if I browse to my DDNS address proceeded by the port number - I can access my services absolutely fine.
What I am wanting to do is use sub-domains on a domain that I already own to make the URLs a bit more friendly. However I have tried setting up simple web redirects & these don't work for some reason.
For example;
sab.domain.com = DDNS_address:9090
plex.domain.com = DDNS_address:32400/web/index.html
When trying to access I get 404 Not Found errors.
I don't host my own IIS or Apache server, the domain is hosted by an online provider.
Is this possible or worth too much hassle?
Thanks.

Related

Redirect URL to different IP address

I have 3 HTTPS IIS web servers at home all with different URLs configured. My WAN is a single dynamic IP address provided by my ISP.
I would like to somehow redirect to the correct web server and IP address based upon the url the client requests.
Example
domain.com:443 > 192.168.0.3
domain1.com:443 > 192.168.0.4
domain2.com:443 > 192.168.0.5
I have been reading up about reverse proxies and IIS ARR but all this seems to redirect to an application or directory within IIS on the same server.
Can anyone please recommend a simple way to just redirect a url to an IP address?
Something within Windows and not Linux based preferably.
Thank you for your help in advance.

Specifying an IP Address in FireMonkey TWebBrowser

The FireMonkey TWebBrowser component allows the developer to specify a local file (file://...) or a URL (https://www...). However, there seems to be no way to get the browser to work by specifying an IP address (192.168.1... or http://192.168.1... etc.) The browser just appears to hang.
Is it possible to specify an IP address with this component?
I'm currently using Delphi 10.4.2 developing for iPhone. Safari on the same phone has no problem accessing 192.168.1... addresses.
Navigating to Websites using HTTPS protocol and IP address will be blocked in most browsers. Why? Website certificates that are used to confirm validity of specific website are domain based and not IP based.
This means that the Website will be treated as safe only when you navigate to it by using valid domain for which the website digital certificate was issued.
But when you try to navigate to such site using IP address of a server on which it is hosted most browsers will mark the site certificate as invalid and thus stop the navigation to such site. This is to prevent you from being redirected to another server that does not belong to specific domain for which web certificate has been issued.
PS: You can test this even with your default browser. Try navigating to a HTTPS site using URL using format https://x.x.x.x:443.
Note how I added 443 to the end of the specified URL. 443 is a default HTTPS port. Not specifying this port number as part of URL most browsers will always try to navigate using port 80 that is used for HTTP despite the fact that you specified HTTPS protocol in your URL.
Now if the website supports both HTTP and HTTPS protocols you may end up on HTTP site despite the fact that you specified HTTPS protocol in your URL.
And if that HTTP website offers automatic redirect to HTTPS site you may in the end actually end up on HTTPS version of that site. But it won't be HTTPS site containing the IP address you specified but instead the proper domain name of that site.
You can see this by trying to navigate using the above mentioned approach to https://142.250.180.174/ which is actually server for google.com.
NOTE: Not all Websites support this. For instance you can't reach HTTPS site of embarcadero.com using such approach.

Was this site hacked? URL redirects when "www" removed.

I'm trying to figure out whether a website I use was hacked.
When I access the site via www.site-name.com, I'm taken to the website.
However, when I access the site without the "www," i.e. site-name.com, I'm taken to a different website.
Why is this happening? I did a little research and my only guess is that someone changed the site's .htaccess file, but that seems unlikely, as the different website has no relation to the official site.
Can someone help me understand what's going on here?
One IP address can host multiple websites with different hostnames using Virtual Name Hosting.
The HTTP server will look at the Host header in the request to determine what site to use for a given request.
This lets you have one IP address serving example.com and example.net.
Typically, the first Virtual Name Host will be the default, so if you were to ask for example.org the server would not recognise it and give you example.com instead.
In this case, it appears that the server has a Virtual Name Host configured for www.site-name.com but not for site-name.com so requests for site-name.com get the default site for the server.

How is it called when you use "mail" in "mail.google.com" for example?

I know it is probably a dumb question, but I don't know how to refer to it.
How is it called when we use the subdirectory comming first in the URL and how is it configured? Is it something configured on the server?
It's called subdomain and it's configured as a DNS entry and Web server listens requests to the whole subdomain.
Some domain registrars have DNS host record configuration, where you set up - for example - mail.youdomain.com for a given IP address. Finally, domain registrar's DNS server points to the configured IP address, and Web server receives a request with that IP address and the mail.youdomain.com host name to identify which Web site should be served to the client (f.e. a Web browser).
Configuration may depend on the Web server technology (i.e. Apache, IIS, ...).

https URL redirecting to external site

Hi I have a website that I will be developing in the future.
Upon looking at the current website I noticed something weird that I have never seen before and also Google'd and found nothing.
If you go to: http://www.smartrainer.com.au you get the normal site
But, if you go to: https://www.smartrainer.com.au you get redirected to another website and are also given an SSL warning beforehand (in Chrome)
The site is hosted on a UNIX / PHP server and the .htaccess file currently has nothing that would suggest that it's redirecting to this other website.
Any help or insight would be appreciated with this, because I've never heard of this or seen this before.. The client also has no idea why it would be directing to that company that we've never heard of
Thanks!
It sounds like you're using a shared hosting server.
In plain HTTP, the server can know which host the client is requesting using the Host header in the request (this is based on the URL). Apache Httpd supports this with what it calls Name-based virtual hosts.
The HTTPS configuration is separate from the HTTP configuration in Apache Httpd (and presumably a number of other servers). Having virtual hosts (typically on a shared host) for the HTTP configuration doesn't mean that the same configuration is replicated for HTTPS.
HTTPS presents another problem: choosing which certificate to send before being able to see the Host header. Indeed, the server needs to send the client a certificate with the correct name during the SSL/TLS handshake, which happens before any HTTP traffic is sent (so before the Host header can be read). To overcome this problem, some hosts will set up a certificate valid for multiple host names (typically multiple Subject Alternative Names, or sometimes wilcards), others will use Server Name Indication (which isn't supported by all clients).
To get your server to host your site for HTTPS, you'd need:
To make sure the certificate it serves is valid for your host name (otherwise, there will be a warning message).
That the virtual hosts (or equivalent) it serves are configured for your host too.
In your case it seems that (a) your server is serving a single certificate that is not valid for your host and (b) your host isn't configured for HTTPS anyway, since you're falling back to what's probably the default host.
You may solve this issue by redirecting HTTPS URL to HTTP URL from your .htaccess. This error might because of shared hosting. If you cannot solve this issue from your .htaccess than you may also contact your hosting provider on this issue.

Resources