Redirecting ampproject URL to original site while implementing amp update-cache

505 Views Asked by At

I'm trying to implement amp update cache, but facing issue while accessing "apikey.pub" amp-project URL.

https://www-example-in.cdn.ampproject.org/c/s/www.example.in/.well-known/amphtml/apikey.pub

redirecting to

www.example.in/.well-known/amphtml/apikey.pub

I also try with

https://www-example-in.cdn.ampproject.org/r/s/www.example.in/.well-known/amphtml/apikey.pub

it's show error:

The requested URL /r/s/www.example.in/.well-known/amphtml/apikey.pub was not found on this server.

I have already put my public key on www.example.in/.well-known/amphtml/apikey.pub.

Please help me to resolve this issue.

1

There are 1 best solutions below

2
iman On

the address ./well-known/amphtml/apikey.pub is an address on your website to store public key of signiture and must return text/plain header on response. you are try to make it on amp cache server!