0

I have a site hosted on github pages from which I share some pages to facebook. Everything has been fine until today when all of a sudden the images that were supposed to appear when sharing a link (URL) didn't appear. So, I'm trying to get to the root cause of this.

I've tested the URL's in facebook's 'sharing debugger' tool that I normally use to resolve such problems with.

Now I'm getting a

Bad Response Code: URL returned a bad HTTP response code: Response Code 403

instead of 'Response Code 200 OK'

This appears to be all pages including those that were previously OK.

So, I ran a cURL command to see what that showed:

C:\Users\owner>curl -I nuttyskitchen.co.uk
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Length: 162
Server: GitHub.com
Content-Type: text/html
Location: https://www.nuttyskitchen.co.uk/
X-GitHub-Request-Id: 2D99:185178:589C03:59F3D4:66D1E682
Accept-Ranges: bytes
Age: 0
Date: Fri, 30 Aug 2024 15:34:27 GMT
Via: 1.1 varnish
X-Served-By: cache-ams2100087-AMS
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1725032067.025061,VS0,VE103
Vary: Accept-Encoding
X-Fastly-Request-ID: 7fa3d6e4e6e2f3f8ddf54a373998275196ceecc1

and then did the same for example.com to make a comparrison:

C:\Users\owner>curl -I example.com
HTTP/1.1 200 OK
Accept-Ranges: bytes
Age: 484008
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 30 Aug 2024 16:56:48 GMT
Etag: "3147526947+gzip"
Expires: Fri, 06 Sep 2024 16:56:48 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECAcc (nyd/D17F)
X-Cache: HIT
Content-Length: 1256

and I can see that from the first cURL command I have HTTP/1.1 301 Moved Permanently whereas on the second run for example.com I have HTTP/1.1 200 OK which is what I was expecting to see from nuttyskitchen.co.uk.

Has anyone any experience of this happening specifically on a site hosted on github pages and/or how if anything I can do to resolve it?

I'm really stuck so would be very thankful of any help you can give.

Thanks in advance :¬)

5
  • It is not uncommon for sites to redirect when they want to tweak the URL (ie hostname -> hostname/), or change protocols (ie http: -> https:), or add cookies, etc. This is certainly not limited to just GitHub. Do you have the same redirect if you ask curl to get https://nuttyskitchen.co.uk/ directly? Commented Aug 30 at 19:40
  • no I get this response: C:\Users\owner>curl https://nuttyskitchen.co.uk curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate.
    – Fishbite
    Commented Aug 31 at 13:30
  • & FWIW today I'm getting a http response of 206 in facebook's sharing debugger. I don't know if this a facebook problem or github pages server.
    – Fishbite
    Commented Aug 31 at 13:46
  • Regarding the schannel error, try adding the -k option to skip certificate validation. Regarding the 206 response, that should only happen if a ranged request (ie the Range request header) was sent to download only a portion of a file Commented Aug 31 at 17:06
  • Yeah! Thank for that, finally I have a decent response 200 OK using curl. Still getting that 206 response in facebooks tool though. Surely that can only be facebook making a range request and not the github server having a wobbly?
    – Fishbite
    Commented Aug 31 at 18:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.