Skip to main content
3 of 4
edited title

Is there any point to use absolute URLs for asset files like css/js for SEO optimization?

Should I use absolute paths for CSS or JS resources in <link and <script tags?

Is there any reason?

Some SEO optimization say fix it, should I do it for any reason?

I do not know why, if everything is working fine?

<link rel="stylesheet" href="/css/main_rtl.css?v=5e6e47e9"> <script src="/lib/js/frameworks.min.js?v=5e6e47e9"></script> 

Vs

<link rel="stylesheet" href="https://sample.com/css/main_rtl.css?v=5e6e47e9"> <script src="https://example.com/lib/js/frameworks.min.js?v=5e6e47e9"></script> 

Is there any SEO-related point?

Shorter version is smaller HTML at least.