Do I need rel = "nofollow" in external scripts and stylesheets?
I've already read a lot about SEO and web performance, but now I have a dumb question that I'm trying to answer myself, but I can't. Well used rel="nofollow"
in many cases to improve SEO, it is well known and well documented.
But now think:
If I have external stylesheets (.css) and scripts (.js) that are not hosted on my website, do I need to use rel="nofollow"
to improve my SEO?
Example:
Let's assume my site is google . If I have the following information inside my page:
<link href="http://www.blabla.com/myAwesomeStylesheet.css" type="text/css">
<script href="http://www.chucknorris.com/youWillDie.min.js" type="text/javascript">
Which one is better:
<!-- First way -->
<link href="http://www.blabla.com/myAwesomeStylesheet.css" rel="stylesheet" type="text/css">
<script href="http://www.chucknorris.com/youWillDie.min.js" type="text/javascript">
<!-- Second way -->
<link href="http://www.blabla.com/myAwesomeStylesheet.css" rel="nofollow" type="text/css">
<script href="http://www.chucknorris.com/youWillDie.min.js" rel="nofollow" type="text/javascript">
<!-- Third way -->
<link href="http://www.blabla.com/myAwesomeStylesheet.css" type="text/css">
<script href="http://www.chucknorris.com/youWillDie.min.js" type="text/javascript">
source to share
SEO tips are not relevant on Stack Overflow. But your question can be answered because ...
In HTML5, the link type nofollow
can only be used with elements a
and area
.
So don't use it on elements link
.
For elements , there is no in the first place . script
rel
(Note: your element script
matters type
text/css
. This is probably not what you want. If its JavaScript, use text/javascript
( or omit the attributetype
).)
source to share