I encountered this apparently simple situation recently.

The issue is that it seems no matter how you wire it, you'll always end up with a black connected to white, which seems wrong.

How should this simple light fixture controlled by a switch be properly wired?

enter image description here


Why do you consider a black to a white wrong?? The whole "black-to-black, white-to-white" is a wives tale and myth.

What you have is a switch loop, and is VERY common, especially in 50's and 60's homes.

The white from the panel goes to the white from the fixture. This is the neutral. The black from the panel goes to the white from the switch. This is the feed. The black from the switch goes to the black from the fixture. This is the switched hot.

Modern codes do require that the white to the switch get re-marked with a hot color (typically black, red or blue) with a permanent method such as paint, a permanent marker or even tape.

| improve this answer | |
  • 4
    +1 For existing fixtures and wiring, this is exactly right. If you are running new switches, code in most jurisdictions requires that you also run a neutral (true white) to the switch as well, so that it is available if you ever decide to use a smart switches which require a neutral. For new wiring, you would run a three wire cable and use the red and black for the loop and leave the white unused and capped in the switch box. – bib Jun 1 '15 at 12:38
  • 1
    If you are working on an older home with unmarked switch loops, when you trace them, also mark the white wires that should be marked, so that they are marked for the next time you or someone else needs to work on the circuit. – Ecnerwal Jun 1 '15 at 15:47

You are entirely reasonable to expect color-coding. I couldn't work without it, I'll say why at the end.

Use tape to code by function

But a switch circuit has a third wire function, called switched-hot. Use tape to mark wires to a different color. Which color should switched-hot be? Think about it:

Why do you use only black and white? Because you are using NM cable, and that's how it's sold. Neutral must be white, because Code requires this. Most places, black is always-hot, so you might as well stay with that.

Code now forces you to use /3 cable for switch loops, and the third wire is red. So it makes a world of sense to use red for switched-hot. So, voila.

enter image description here

That was easy. Black to black. White to white. Red to red. Done.

The other color-code I use is yellow for travelers in 3-way switches. (Both since there is no need to distinguish them from each other.) 3-ways are a nightmare if you don't do this, but if you do, it's easy. Two yellows in the same cable - guaranteed to be travelers.

I also use blue for "alt" switched-hot or for second set of 3-way travelers.

"Why? You can't figure out a simple switch loop, Harper?" Yes. Because it makes things really simple and easy to maintain. Here's an example of two switch loops, how hard can that be, right?

enter image description here

Here is the color coding. Circuit 1: H black, N white, Switched brown. Circuit 2: H red, N gray, Switched yellow. Circuit 3: H blue, N white-blue. LR=Lighting Receptacle (blue is unswitched). Switches up top, more switched outlets below. There are 7 wire-nuts in this box. Yet still, easy to maintain: as above, white to white, gray to gray, yellow to yellow.

| improve this answer | |
  • 2
    "Feel the power of the rainbow!" :D – ThreePhaseEel Jan 18 '18 at 12:42

Technically, the wire loop if you think about it is actually one wire with two different colors. It has no resistance in the branch circuit. It only serves to make and break the circuit.

Today's code says a neutral must also be present at every switch box even though it is not being used. There are a couple exceptions to this but none the less, required. This is a good reason why we are required to tape the white as a different color so as not to confuse it as a neutral.

In the good old days instead of switching the live conductor, the neutral was switched. This is not safe and is taught to never be done.

| improve this answer | |
  • Which "good old days" are you referring to? Transylvanian 1800's electric code? And the reason that the Neutral is now required is that many "modern" switches/dimmers/occupancy sensors DO use it. – Ecnerwal Jun 1 '15 at 14:35
  • Heh, just a figure if speech. The reason is to keep electricians from putting unwanted current on the ground, which is related to home automation "smart switches". – Kris Jun 1 '15 at 14:54
  • Switching the neutral has never been code, AFAIK. You appear to be claiming that it was. I know perfectly well why neutral at the switch is required in current code. – Ecnerwal Jun 1 '15 at 15:43
  • @Ecnerwal There were certain kinds of three-way switch loops that are now banned that switched neutral and would even send hot to neutral in certain configurations. – Random832 Jun 1 '15 at 17:53

One way to wire it is to add a (red) wire from the junction to the switch.

Then pigtail all whites together.

Connect black from breaker to black from switch.

The connect red from switch to black to light.

In the switch you cap off the white and connect black an red to be switched.

This results in a available neutral connection at the switch you can use later for a timer or other automation gadget.

| improve this answer | |
  • 1
    If this circuit is wired in cable then you cannot just add a red wire. – Speedy Petey Jun 1 '15 at 22:05

If the power runs from the panel to the switch first, there is no need to use white for the switch leg. Merely splice the neutral through and switch the black.

| improve this answer | |
  • Re-wiring is not an option: The wires are already run though finished walls. I can only hookup the end points I have access to. – abelenky Jun 2 '15 at 19:22
  • @John Braekinbg, then it would not be a switch loop, would it? – Speedy Petey Jun 2 '15 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.