The ozone layer is primarily located in the stratosphere. It absorbs most of the Sun's harmful UV-B radiation.