It's not a working design. try switching something not lethal first. The gate has no point of reference.
Also RS is not a great source of HV electronics.
Is the 500V AC or DC?
You need isolation between your 10V and the 500V like an optoisolator.
500V can mess up your day, life etc...