To sense the outside world, some neurons protrude across epithelia, the cellular barriers that line every surface of our bodies. To study the morphogenesis of such neurons, we examined the C. elegans amphid, in which dendrites protrude through a glial channel at the nose. During development, amphid dendrites extend by attaching to the nose via DYF-7, a type of protein typically found in epithelial apical ECM. Here, we show that amphid neurons and glia exhibit epithelial properties, including tight junctions and apical-basal polarity, and develop in a manner resembling other epithelia. We find that DYF-7 is a fibril-forming apical ECM component that prevents rupture of the tube-shaped glial channel, reminiscent of roles for apical ECM in other narrow epithelial tubes. We also identify a role for FRM-2, a homolog of EPBL15/moe/Yurt which promote epithelial integrity in other systems. Finally, we show that other environmentally-exposed neurons share a requirement for DYF-7. Together, our results suggest that these neurons and glia can be viewed as part of an epithelium continuous with the skin, and are shaped by mechanisms shared with other epithelia.