This study investigates how SEO principles affect headline writing in local digital news media. The focus is on how SEO relates to user experience and information architecture. As journalism becomes more digital headlines play an important role both as tools for visibility and as summaries of content. The study is based on a quantitative content analysis of 200 headlines from four Swedish local news outlets. The analysis uses a coding scheme that includes variables such as headline length, keyword use, metadata, informativeness and clickbait headlines. The results show that SEO elements, especially keywords and metadata, are commonly used. The use of clickbait varies greatly between outlets. NWT often uses emotional and less informative headlines while Norran and VF prefer more factual and informative headlines. The study finds that SEO and user experience do not necessarily conflict but headline strategies must be carefully considered to maintain credibility and usability. The analysis also shows how headlines are structured technically with HTML tags and how headline wording is often adjusted depending on the platform. These findings provide new insights into the role of headlines in digital news where both search engine visibility and user navigation shape journalistic content. This knowledge can help develop future SEO guidelines for local journalism.