Is this MOSFET / DC Motor circuit correct?

I have wired a small circuit that powers a DC motor using a FQP30N06L and a 1N-4001 diode (see attachment). The circuit works, that is increasing the output of Pin 9 increases the motor speed.

I am still wondering if the circuit is correct. Especially the placement of the diode.

Yes, the diode goes across the motor since its a free-wheeling diode.

I hope you have something a lot more powerful than a PP3 sized 9V battery if you are powering
a motor, those aren't good for more than a dozen milliamps or so.