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 :¬)
hostname
->hostname/
), or change protocols (iehttp:
->https:
), or add cookies, etc. This is certainly not limited to just GitHub. Do you have the same redirect if you ask curl to gethttps://nuttyskitchen.co.uk/
directly?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.
-k
option to skip certificate validation. Regarding the 206 response, that should only happen if a ranged request (ie theRange
request header) was sent to download only a portion of a file