How would Google index and rank Two domains that point to the same host - seo

If I had two domains A.com and B.com, both of theme point to the same host so :
A.com/page.html
would display exactly the same result as :
B.com/page.html
How would Google index and rank both websites ? what is the expected behavior ? Note that there is no redirection applied here.

Google has no problem with indexing your website that has a same host. If you have different content and structures for both your websites, then Google will definitely index your web pages continuously.
But, when it comes for ranking, it has one issue about your IP address. Shared hosting has a C class IP address and it does not provide a unique IP address for each domain. Therefore, it is one of the considerable ranking factor with shared hosting.

Related

How do I limit access to my tomcat page by allowing multiple ip ranges not a specific IP address?

I'm using Tomcat 8 and I need to whitelist (allow) multiple sets of IP ranges only to have access to the tomcat login page.
I've found documentation on how to do specific IP addresses but not ranges.
Is this possible?
I've already tried many suggestions from other posts here but I've not seen anything related specifically to ip ranges.
Ideally I'm looking for something like this ;
I expect from implementing this limitation that nobody is shown the login page apart from people connecting from the allowed IP range.

CNAME Domain Mapping/forwarding in a Saas Application

I am trying to provide a feature for my users to map their custom domain [ which they will will purchase themselves ] and to their profile/page on my website say client.foo.com, using CNAME domain forwarding.
I have gone through various questions on StackOverflow regarding the same problem but all have focused on creating wildcard subdomains which I have already done and they function well.
Assumptions:
I am currently on a shared hosting, hence shared IP. [I can purchase a dedicated IP if that does the job efficiently.].
I am using apache server hence please suggest the solutions considering the same.
A better explanation of My issue - [Taken from other StackOverflow question, but solutions not as requested]:
I host at fooservice.com. For each user, they get their own subdomain bob.fooservice.com. I'm pretty sure I can get that part covered. Let's also assume that Bob wants the service to appear as a subdomain of his site awesomebob.com. He wants it to be foo.awesomebob.com. I know that what Bob has to do is add a CNAME record from foo.awesomebob.com -> bob.fooservice.com. My question is what do I have to do to make sure that valuable on my fooservice server.
Thank you for all your valuable suggestion well in advance.
Based on your explanation, you use wildcard subdomains, which all have the same IP I assume and you want to automate the process right?
So, as CNAME record is only pointing to the IP address, not redirecting, you need to create virtual host in the first order than other virtual host.
In this virtual host, create a script (index.php) to serve the correct subdomain's page from the requested custom domain.

CPanel: How to use two different domains in one hosting account, keeping url?

Right now there's two different accounts, with both domains having each their own hosting account,
for similar website (let's say domain.fr and domain.co.uk)!
I've merged the two websites into one (currently hosted as 0.0.0.0/site/language ),
making it multilanguage! The script just need a prefix on root,
such as like www.domain.com/english/ or www.domain.com/french.
This works as expected, if only a domain is used, but I would like to use two different domains (domain.fr / domain.co.uk).
So, I want to catch the current request URL, to know what language to display. What's important is that, the request urls keep persistent.
For example,
http://domain.co.uk/language_english
http://domain.co.uk/language_english/somepage.php
http://domain.co.uk/language_english/somedirectory/someotherpage.php
While,
http://domain.fr/language_french
http://domain.fr/language_french/somepage.php
http://domain.fr/language_french/somedirectory/someotherpage.php
This two domains are actuall hosted in same hosting account, let's said
127.0.0.1/language_variable/somepage.php
Any suggestions or good practices?
If I got your question , It's a feature in Web Hosting's solution which is called Addon Domains and depend on hosting company that how many Addon Domain they let you to put into one account !

What is the best technique for (seo-friendly) forwarding muliple domains to one web server?

The setup is:
www.domainA.com
www.domainB.com
both actually hosted on one web server (Apache)
123.123.123.123/domainA
123.123.123.123/domainB
I have setup a hidden forward from the domains to the web server directories which works fine, however, produces duplicate content (since it is also available by addressing the web server directly). I tried setting up 301 redirects to the domains for every request that is targeting the IP address directly (using mod_rewrite),but found that this results in a forwarding loop. Obviously the server does not recognize whether the domain has been requested originally.
If anybody can give me a hint on how this is supposed to be done, I'd be glad to hear.
You can set up virtual hosting on the web-server so that it does pay attention to the hostname that was requested. This is a fairly common practice and should solve your problem. You can do away with separate subdirectories since each virtual host has its own virtual root.
So are you saying that you have pages indexed in google that reference your IP address and a directory rather than the domain name?
Also, I'm not sure why doing a redirect from the IP to the domain name would cause a redirect loop. If the redirect is based on the host header, it should work fine.

How to prevent hackers from exploiting Apache ->Sites-available -> Default file

We noticed that a hacker created a domain and configured DNS to point it to our server's IP address.
We are using apache2.x on Ubuntu.
There is a "default" file in apache's /etc/apache2/sites-available directory and it looks like the the hacker's domain is using "default" apache configuration file to display our web content in their domain.
How can we prevent this?
Can some one post a "default" apache configuration file as an example?
Unknown domains that come into apache over the specified ip and port will be directed to the first virtual host, thus the 000-default file. Your best bet is to make the 000-default host return a 400 or 500 error (or some explicit message saying the domain doesn't belong) and use explicit virtualhosts for each of your sites.
+1 Jeremy's answer: make the default (first) virtual host for each IP address you're listening on return something useless like a 404 or page saying nothing but “this is a virtual server”.
Allowing your web server to serve a real web site on a non-matching ‘Host’-name (including a raw IP address) opens you up to two particular attacks:
DNS rebinding attacks, leading to cross-site scripting into your real web site.
This affects sites with a user access element (eg. logging in, cookies, supposedly-private intranet apps).
‘Search-hijacking’. This affects all sites (even completely static ones). This may be what is happening to you. By pointing their own domain name at your server, they can make search engines see both the real domain name and their fake one as duplicates for the same site. By using SEO techniques they can then try to make their fake address seem like the more popular, at which point the search engines see that as the canonical address for the site, and will start linking to it exclusively instead of yours.
Most web servers are configured by default to serve a web site to all-comers, regardless of what hostname or IP address they're accessing it through. This is a dangerous mistake. For all real live sites, configure it to require that the ‘Host’ header matches your real canonical hostname.