It is important from a code perspective as well as a safety perspective to correctly identify the neutral versus the “hot” wire when connecting a light fixture. Just because the fixture works doesn’t mean that it has been wired correctly. Connecting the wires in reverse — hot to neutral and neutral to hot — will still work, but chances for a shock when touching the fixture or changing a bulb is much greater if it is done incorrectly.
1.Turn off power to the box before removing the cover or old fixture. Remove the box cover or the old fixture. Make sure the wires are separate and not touching metal or each other.
2.Turn the power back on. Test with the voltage tester. A noncontact voltage tester is easy and safe to use as you don’t have to actually touch the wire. Turn on the tester and bring the tip close to the exposed end of each wire. The hot one will give a visual and audible alert. Most likely the neutral wire is white and the hot wire is red or black, but test to make sure.
3.Identify the neutral wire in the fixture by looking at the wires. In most modern fixtures the neutral wire will be white and the hot wire is red or black. In some types of fixtures, both wires will be the same color. In this case, the neutral wire is always identified by some means. In some cases, there will be small writing on the wiring case. In others, there are small ridges or indentations on the insulation.
If you are removing an old fixture, look at the wiring that is in place. This can give you an extra visual cue to the neutral wire.
If the house if very old and has aluminum wiring, then this is no longer a do-it-yourself project. The wire will be silver or dull gray rather than copper colored.