Search engine optimization is always a hop topic. This is due to two facts: Google is constantly changing its algorithms to provide users with even better search results. Second, search engine optimization has become increasingly complex. One aspect that often falls under the table is the optimization of URLs. There is also much to pay attention to here.
Search engines should be able to understand the URLs. They also appear more trustworthy to users when the content of the page is reflected in the URL. Therefore: instead of example.com/id_863% take example.com/search-engine-optimization-urls.
Use spaces and special characters correctly
WordPress automatically inserts hyphens for spaces. Because spaces in URLs are always replaced by other characters, care should be taken to ensure that they are actually hyphens. Other symbols such as underscores are not identified as spaces by the search engines, hence they have difficulties interpreting them correctly.
Caution is also advised when using special characters such as umlauts or symbols. The former are often converted automatically. In general, you should do without special characters and instead of ä simply use ae.
Does length matter?
The URL should mirror the contents of the page to a certain degree. It does not require any filler words (e.g. articles or prepositions) for this. Eternally long URLs rather distract than spike curiosity and Google evaluated relevance, not arbitrariness. This also leads us to the next aspect.
Keywords yes, but the right ones
The most important keyword should definitely be part of the URL – best in the front part. However, do not go overboard with this. Anyone who tries to cram as many keywords as possible into the URL will ultimately fall and not rise in the rankings.
Block bad URLs
Dynamic links, which are created through the search feature in webshops, are not optimal. Search engines might consider these dynamic links as duplicate contents, which is very bad for your ranking. Such dynamic URLs can be excluded by using a robots.txt file. This also applies to other pages that you do not want crawled by Google.
Sometimes you have to move content from one page to another. In this case, you should set up a 301 redirect from the old URL to the new. This avoids the existence of URLs that ultimately refer to a 404 error page.
Consistency and structure
There is a lot to be said for consistency. Businesses should find a consistent line when creating URLs and keep adhere to it as long as it works for them.
Another important issue are canonical links in this context. Content is often used several times on different pages, especially on webshops (keyword: dynamic links). Here it makes sense to refer to the original resource. For this purpose, the link element is inserted in the header of an HTML document: <link rel = "canonical" href = "https://example.com/subpage.html">