Error 500 when google indexing robots visits my website (IIS) - iis

I've developped a website in asp.net mvc3 and I'm thus hosting it on a windows server (OVH).
The domain name is registered with GoDaddy and I thus have edited the DNS record of type A to point to my OVH hosting server.
GoDaddy DNS records
-------------------
Host : #
Points to : [Server-IP]
TTL : 1 Hour
Host : www
Points to : [Server-IP]
TTL : 1 Hour
Therefore I can visit the website but when Google Robot try to visit my website, it gets an error 500 (which means a server-side error), which cause my website not to be indexed by google, bing and other search engines.
I can view an error 500 every week in Google Webmaster Tools error log whan the robot try to index my website.
Do I have made a mistake while configuring the DNS record on GoDaddy? Or do I have to edit something in the IIS Manager ?
Thanks a lot !

500 usually means there is an error in your code. Check windows event logs for .NET exceptions or setup ELMAH to log all uncaught exceptions.

Related

Googlebot and Google Mobile bot Crawl Error after Domain IP and Domain DNS changed (Site not Reachable)

in past week I had to change my server to cloud (Digital Ocean Droplet), I am using a shared service but the concurrent user reached the number of Php execution (30). I shifted the entire site and site is up and running successfully, moreover Yandex and Bing are able to crawl my website but it is Google that I want.
I have got like 100K errors in console dashboard and raising, google ads bot isn't able to crawl my pages too. I have checked the following and there is no error in these.
.htaccess and redirections.
SSL
DNS records (I shifted name servers to DO and then back to registrar to see if the DNS was the error) but it doesn't seem like it is.
I double checked robots.txt it is fine by the google robots.txt validator and other search engines.
Similar setups are running on other servers with no changes at all the are fine.
UfW, I am new to it but due to its temporary nature I don't think it is the reason. I disabled it and checked it doesn't make difference.
I haven't blocked anything on apache so it should be good too.
The error that appears is attached at screenshots
Help me out as instead of scaling, I am going down bad.
I repointed the DNS through another service it took its time but it is resolved. I wasn't sure about the error, now I am, it is because of improper or partial DNS resolution issue.

Application Request Routing: Why some sites return HTTP 404 some don't?

I want to add a load balancer to an existing asp.net project using Application Request Routing. So I made myself familiar with the concepts and created a local test-setup:
IIS locally running on Windows 10:
Installed Application Request Routing 3.0 with Windows Platform Installer
Created server farm with following servers:
<test-server-name>.de (Microsoft 2012 R2 Server: contains the asp.net project)
www.google.com (just to see if load balancing and url rewriting works because I don't have two test servers available)
URL-Rewriting rule:
After typing localhost multiple times in any browser, I can see that load balancing (weighted round robin) is working fine. It's alternating between 1. and 2. website.
The problem I'm facing is a 404 Error on both websites.
I already tried the following:
Installing and enabling Failed Request Tracing Rules (on local IIS): URL Rewriting is working properly i think.
Failed Request Log for www.google.com: google drive, unzip and open xml in e.g. IE for better view
Create Server Farm without automatic creation of URL Rewrite rules
(selecting No and create own URL Rewrite rule)
Change "Managed Pipeline Mode"-setting of Applcation Pool from Integrated to Classic
Healthcheck on other Websites I have absolutly no clue why it's working on Git-websites and why facebook is returning a 400 error code.
Enabling/disabling proxy (IIS-Manager -> Application Request Routing Cache -> Server Proxy Settings...)
I don't know what i could do next, so I appreciate any help. Thanks.
Answer can be found here: https://forums.iis.net/t/1238739.aspx?Why+some+sites+return+HTTP+404+some+don+t+
Some websites simply don't support localhost as hostname, which is why localhost can't be found (error 404) e.g. on google.com
Detailed answer if link above is not working in future:
That is not an effective test.
What you are doing is sending the hostname of your request to the third party servers. Like Google.
So if your request is say http://example.com you are sending this to say www.google.com and the Google servers will likely reject this as you can see
Web server admins generally don't let themselves receive traffic from domain thet do not host.
If you sent a request to my servers IP with mysite.com I too would likely reject it. (Things get complex if you have wildcard sites and you allow all traffic through)
But simply showing that 404 page from Google means tour request hit there server so that implies ARR is working.
If you really wanted to test it this way have a local host file with www.google.com resolving to your servers IP. Set up a site with www.google.com as the hostheader and then you should see the correct info hitting Google. But there is no accounting for what 3rd party admins do on their side.

cannot verify domain with bitly

Last night I purchased a new domain with the intention of turning it into a vanity url service for my blog!
I created the a record on both cpanel and my domain registrar to point to bit.ly. This morning however once the domain had propagated I went to verify my domain with bitly and was still getting the same message...
Short Domain verification failed for "bblg.in". Neither an A Record
nor a CNAME record was found.
I went to to domain in chrome and I am getting a 403 forbidden page however if I goto the www. version of that domain it automatically redirects to bitly.com
Weirdly if I visit the non-www version of that domain on chrome on my android mobile device that redirects to the mobile version of bitly.com but if i visit www.bblg.in on my mobile I get a 403 forbidden page.
I assume there is some redirect issue going on which is preventing me to verify my domain with bitly and would probably need a .htaccess file on there! Also to confirm there is nothing in the bblg.in file on my server just a cgi-bin file that automatically gets placed there.
Any help in this would be greatly appreciated! Many thanks
- Phillip Dew

IIS multiple HTTPS web sites with different host headers

I've got so far with this and hit a brick wall. I have set up 4 web sites on one server in IIS:
Default Web Site (myserver.mydomain.com)
D:\websites\default\
Apple (apple.mydomain.com)
D:\websites\apple\
Orange (orange.mydomain.com)
D:\websites\orange\
Pear (orange.mydomain.com)
D:\websites\pear\
I have configured the site bindings using the command line as per this guide and it now looks like I want it to. When I do appcmd list sites it returns the following:
SITE "Default Web Site" (id:1,bindings:net.tcp/808:*,net.pipe/*,net.msmq/localhost,msmq.formatname/localhost,https/*:443:,state:Started)
SITE "apple" (id:2,bindings:https/*:443:apple.syfire.gov.uk,state:Started)
SITE "orange" (id:3,bindings:https/*:443:orange.syfire.gov.uk,state:Started)
SITE "pear" (id:4,bindings:https/*:443:pear.syfire.gov.uk,state:Started)
Results:
"myserver.mydomain.com" returns the error Server Error in Application "DEFAULT WEB SITE"
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory. despite there being a Default Document configured (index.html). EDIT: If I switch Directory Browsing on it shows the contents of D:\websites\default\ (as it should) and I can navigate to index.html, but when it's off it can't seem to find the file itself.
"apple.mydomain.com" works fine and shows the default page stored in D:\websites\apple\.
"orange.mydomain.com" and "pear.mydomain.com" return error Server not found (Firefox), Internet Explorer cannot display the webpage (IE).
I'm sure I've missed something critical to this operation! Thanks.
Try replacing * with the ip address that you are listening on. This is what I used to get something similar to work in IIS 6 on Windows 2003.

IIS 7.5 pointing requests to wrong physical path

I have a website set up on IIS 7.5. The host headers are working, the pages are returning fine. But when the browser requests an image, I get a 404 message. And I noticed that in the 404 details, the "Physical Path" that is specified is on the "c:\inetpub\wwwroot\images...".
The reason this is so strange is that the website is on the "D:" drive: "d:\inetpub\wwwroot\images...". The physical path is configured properly on IIS (I've done this a million times) but when attempting to serve images, it's using the wrong drive... why? Where is it getting this? I'm competently experienced with IIS for more than a decade and I have never seen this before. WTF??
You probably have two web sites binding to the same IP address, and one of them (with the physical path shown) is being honored.
If you add your application/virtual under the one website that's not being honor, you will see this error.
You need to set up the application under the web site that's being honored by IIS when using the IP.

Resources