Why relative URLs should be forbidden for web developers • Yoast Developer Portal
Many web developers still use relative urls in their CMS. A relative url is a url that is not complete. Usually it's just the last part (the path) of a url, which means the domain name is left out. It's often used by web developers, because it comes in handy when moving content from a test or staging environment to a live environment. However, there are so many disadvantages of relative urls for SEO that I strongly recommended against them.
All sorts of SEO problems on the web are caused by the use of relative URLs in links, canonicals and more. We find issues with them in our website reviews on a regular basis, but as you can see bigger sites like Twitter also have massive issues because of them. I'll try to explain why you shouldn't use them and what you could do instead, as it might be simple things like this that hold you back from performing well with your website.
What are relative URLs?
Relative URLs are all URLs that do not contain a fully qualified domain name and path, but instead just the path or a portion of the path. So when your website is example.com, you could be linking to your contact page from your homepage like this:
Read full article from Why relative URLs should be forbidden for web developers • Yoast Developer Portal
No comments:
Post a Comment