There is no god other than Allah.

Is it correct to write it the way I've written above keeping in mind that the word 'god' is with small 'g' ?

OR it is correct the way I've written below ?

There is no God other than Allah.