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

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, ...).

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.

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.

URL redirect to port

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.

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.

Why IP is not pointing to Joomla main page

Given the following URL: htttp://domain/index.php, where index.php is the main webpage in a joomla server. I want to get the URL with the IP format, http://IP/index.php. I've tried that with several Joomla servers without success. What is it happening?
I will try to keep this answer simple, yet understandable.
The relation between Internet domains and IP address is not necessarily one-to-one.
In shared hosting, a single IP address may be used by several domains (or hostnames).
A Host header, which is a part of the HTTP standard, is sent with the HTTP request. This allows the server to determine which site to serve.
When you are trying to access a domain for which you don't know the IP, DNS lookup is performed, which provides the requested IP address.
A HTTP request is then sent to that IP with a Host header with the hostname (which contains the domain name).
If you are trying to access the ip directly, for example by typing in a web browser's address bar, the value of the Host header will be the IP itself and the server will have no indication what domain you actually want.
It is possible to set up a default behavior for cases where the IP address is directly accessed, but it is highly likely that a shared host will not allow you to set it yourself.

Resources