I have many links from the same web but with different dirreciones

```
<a href="somelink.com/1" title="this link">
</a>
<a href="somelink.com/2" title="this link">
</a>
<a href="somelink.com/3" title="this link">
</a>
<a href="somelink.com/3" title="this link">
</a>

```

He tried to use the code but it does not work for me since he searches for a specific url and not all

```
var a = document.querySelector('a[href="somelink.com"]');
if (a) {
  a.setAttribute('href', 'replacedlink.com')
}
<a href="somelink.com" title="this link">
</a>

```

How could I do it in a massive way and do it to all the url of a web site in estecifico for example: somelink.com