This might be a really dumb question. So I am in the process of migrating a website to another VPS. I've moved the files and restored the database. That's all working well. I am up to the point of installing an SSL with certbot. I have not switched my domains DNS over to the new server yet because I want to get everything set up before pointing it over. I am testing via modifying the host file on my laptop. So my question is, will certbot create a certificate for my website before I actually connect the domain over? Thank you.
Why not just copy your old SSL keys over to the new server? You can't use certbot on the new server until your DNS entry points to it. Certbot requires that a server verify that the domain and itself are under control of the same entity. You do that on the server by running the certbot script. It has a couple of different ways I think to do so, and one is just inserting a text file in your web root that is accessible to certbot's infrastructure.