Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
It differs depending on what you mean by "here". When it indicates the location you are doing the action "writing" (e.g. in a room), で is used, and when it refers to the object/place you are writing your name on (e.g. on a document), に is the one.
In the same logic, your first example sentence should be ここでなまえをかいてください when the speaker means the location of action (e.g. in this room) by "here".