Can't verify domain with 301 redirect on it

I’m currently running
letsencrypt-auto --webroot-path /srv/mainweb -d -d certonly && service nginx reload

I currently have a 301 redirect for all traffic on the to for SEO, but the client fails to update the cert because it says that it’s getting unauthorized errors.

Sounds like you have the redirect always going to the homepage, it should be changed to preserve the rest of the URL.

I forgot to pass the perameters while redirecting to