Original link:
https://tricks.convertri.com/redirect-after-video-completion
Script will forward to:
https://google.com/search?q=redirect-after-video-completion
Original link:
https://tricks.convertri.com/button-fires-pixel
Script will forward to:
https://google.com/search?q=button-fires-pixel
How to redirect all existing links on one/multiple pages of current domain to a new domain, without having to re-edit links one by one (on each page)?
If you are facing this dilemma, then this is your answer!
Until now, you had only Option 1.
Option 1: change all these links to a new domain.
Option 2: Automate the task with script! ;)
Use this script and replace olddomain.com with your old domain and newDomain.com with your new domain.
<script>
const links = document.querySelectorAll('a');
links.forEach(link => {
if (link.href.includes('oldDomain.com')) {
link.href = link.href.replace('oldDomain.com', 'newDomain.com');
}
});
</script>
Here is how to add script in 3 clicks...

Just click below link or button and test.
All links on this page originally lead to tricks.convertri.com (oldDomain.com).
However, when you click them they will go to google.com/search?q= (newDomain.com)
HOPE YOU FIND THIS USEFUL? :)
Let's chat for questions.
If someone wants to go extra-mile to verify whether this script works as I said, just check view-source: of this page. If you still don't believe, then most probably YOU DO NOT NEED THIS! (Procrastinators are mostly wanters, nor needers...)
Here it is showing the original URLs still attached to the button and link, however the script changes on-the-fly:
