For standard car insurance policies, it would be classified as illegal. This is because a named driver is someone who shares the car driven mainly by the policyholder. The main driver is supposed to drive the car more often and not the named driver. If the insurer finds out, your insurance will become invalid. The worst part is when you need to make a claim, the insurer might then and there inform you that your insurance is void because you've been fronting on your car insurance.
Under what sort of circumstances are you driving the car as a named driver? Is it your parents car? Are you a young/new driver?