(A) Schematic of the C. elegans head showing one of the 12 amphid neurons and the two amphid glial cells. Inset shows detail of the nose tip, where the dendrite terminates in a sensory cilium that extends into the environment through a narrow epithelial tube formed by the two glia. Tight junctions (red) demarcate an outward-facing apical compartment (orange) from an inward-facing basolateral compartment (purple). The neuron’s axon, cell body, and most of its ~100 μm long dendrite face the basolateral compartment, while the distal ~5 μm of its dendrite and its sensory cilium face the apical compartment. (B) Minimal transmembrane proteins with no sorting motif localize apically (orange), those with variant dileucine-like or tyrosine motifs localize basolaterally (purple), and those with canonical dileucine or tyrosine motifs localize only to the axon (blue). Changing two amino acids in one of the variant sorting motifs (EREQGREPIL) is sufficient to re-direct it to three compartments: AA (no motif), apical; IL (variant motif), basolateral; LL (canonical motif), axon only.