Getting error while testing website in google page speed - pagespeed

Hi I am trying to test my website on page speed google but getting an error.
"Attempting to load the page reached the limit of 3 client redirects. The last URL fetched was http://www.example.com/. This may indicate the page is redirecting to itself, or has a loop of redirects."
Could you please tell me exactly whats the issue.

It looks like your page is redirecting to itself. Execute the following command in your terminal.
curl -I http://www.example.com
Make sure the URL you are testing with returns HTTP/1.1 200 OK.
You can also use some online tools to find the final destination and use that one for testing the page speed. Check this one - http://redirectdetective.com/

Hi thanks for the reply I have tested the url at "http://redirectdetective.com/" and got no redirects found also I have execute the curl -I http://www.example.com command and got HTTP/1.1 200 OK response.
But still I am getting an error on page speed google.

Related

unable to crawl a website using scrappy but the same website can be requested and used using scrappy shell using same settings

I am trying to crawl the website https://www.rightmove.co.uk/properties/105717104#/?channel=RES_NEW
but I get (410) error
INFO: Ignoring response <410 https://www.rightmove.co.uk/properties/105717104>: HTTP status code is not handled or not allowed
I am just trying to find the properties that have been sold using the notification on the page "This property has been removed by the agent."
I know the website has not blocked me because I am able to use the scrappy shell to get the data and also view(response) works fine too, I can directly go to the same URL using web browser so the 410 doesn't make sense I can also crawl pages from the same domain,
(ie) the pages without the notification "This property has been removed by the agent."
Any help would be much appreciated.
Seem's the when a listing has been marked as removed by and agent on Rightmove then the website will return status code 410 Gone (Which is quite weird). But to solve this, simply do something like this in your request:
def start_requests(self):
yield scrapy.Request(
url='https://www.rightmove.co.uk/properties/105717104#/?channel=RES_NEW',
meta={
'handle_httpstatus_list': [410],
}
)
EDIT
Explanation: Basically, Scrapy will only handle the status code from the response is in the range 200-299, since 2XX means that it was a successful response. In your case, you got a 4XX status code which means that some error happened. By passing handle_httpstatus_list = [410] we tell Scrapy that we want it to also handle 410 responses and not only 200-299.
Here is the docs: https://docs.scrapy.org/en/latest/topics/spider-middleware.html#std-reqmeta-handle_httpstatus_list

Wordpress site returns status 500 but still works

http://ststephens.edu/
This site returns status code 500 (Internal Server Error) when I do
wget http://ststephens.edu/ but works fine on my browser. Also as seen in this screenshot, clearly the homepage is a 500 status but the site seems functional.
What could make this happen?
Web browsers are more flexible then wget. Even if it receives an error code, it will still display the page content returned along with the error code response. Web servers only fall back on their default error view if no content is provided.
Wget and search engine crawlers are more strict. They will bail out as soon as they see the error code response.
I think there is a problem with your server configuration. Check your web server log file. It may tell you why the server gave this error.

Circular redirect path detected and wrong Open Graph data displayed

When sharing the following URL to Facebook
www.magicsoftware.com
You will get outdated information. Facebook refers to the site (magicsoftware.com/en) and takes all the information from the cache.
I tried to clear the cache by going to the dubugger-
https://developers.facebook.com/tools/debug/og/object?q=www.magicsoftware.com
But that didn't help much.
Someone has an idea what I can do?
P.S - if you checked the debugger link, you would see that there are two critical errors mentioned:
Could Not Follow Redirect: URL requested a HTTP redirect, but it could
not be followed. Errors That Must Be Fixed
Circular Redirect Path: Circular redirect path detected (see 'Redirect
Path' section for details).
What does that mean?
Your server is issuing redirect to the same URL as visited based on some condition, actually according to my tests on any requests that came without Accept-Language header get redirected.
See with Accept-Language header, and without any headers
Facebook linter doesn't seems to pass this header while crawling your OpenGraph meta and hung due to redirection loop.
You should avoid that redirection (or at least have some fallback) for Facebook linter to be able to collect updated data and update the cached version.
Same thing is happening to me now. I have no redirect in place. but I am getting this message " there was an error following the redirect path." when using the debugger on this URL http://www.mmaid.co/cleaning-services/offers/coupons/social-discount.php I will give it time and see if it fixes itself.
I found the solution myself - and it's only patience :)
Facebook just needs time to remove their cache files. So the solution is simply to use the Facebook Debugger to enter your URL and then to wait. Facebook will automatically refresh this URL cache.

Response Redirect URL returns HTTP Error 400 - Bad Request

I'm a noob when it comes to ASP.NET. I know few basic commands such as Response.Redirect("URL") to redirect my application web page to a different location.
However i receive HTTP Error 400 - Bad Request, whenever i try to use the code shown below
Response.Redirect(Server.UrlEncode(this.Downloadlink));
where this.Downloadlink is a user defined property which returns something like this
http://mdn.vatsag.net/fp;files/DOWNLOAD/VTSetup.exe
If i post this link in the browser, the .exe file pops up (means the link is good)
However this error comes when i use the ASP.NET code.
Any form of response on this issue/reason is deeply appreciated.
See here: http://www.kirit.com/Response.Redirect%20and%20encoded%20URIs
In short: if you quickly want to fix the issue, remove the part of your code that is UrlEncoding the URL!

Strange automatic HTTP redirect (302 code)

While working on a web crawler, I came across this strange occurrence involving the following web page: http://abudhabitourism.ae/en/
When using wget to download this page, a status code 200 is returned and all is well.
However, when my crawler program requests this page (GET request), the server seems to return status code 302 with a strange-looking "moved-to" field in the location header:
http://sso.adta.ae/opensso/TacCDSSO?localServlet=http%3a%2f%2fabudhabitourism.ae%2f%2fcdsso.ashx&paramName=result&gotoURL=http%3a%2f%2fabudhabitourism.ae%2fen%2fdefault.aspx
Is this actually a url or a script? Any ideas on how I can handle this case in my crawler program (i.e. to be able to automatically extract the correct moved-to url from the location header)
Thanks,
Prof. Chiraz BenAbdelkader
I think wget follows the redirect from the 302. When I use curl to get the page, it returns the headers with 302 and the URL to follow up on.
curl -iI http://abudhabitourism.ae/en/

Resources