Add your website's domain, paste a single snippet into your pages, and your outbound links are converted to shortlinks automatically.
Open the Website Script tool in your dashboard and choose Add domain. Enter the domain of the site where you'll use the script, for example myblog.example.com.
Each domain gets its own unique snippet. Use the Copy snippet button next to the domain you added.
Place the snippet near the end of your HTML, right before </body>, after all your page content.
Open one of your pages in a browser. After a moment, its outbound links are replaced with SafeLinkMe shortlinks.
<script src="https://api.safelinkme.net/ws.js" data-site="YOUR_SITE_KEY"></script>
Always copy the snippet from your dashboard. It already contains your own site key.
The script looks at the links on the page when it loads and converts links that point to other websites. These are left as they are:
Any link that points to the same domain as the page it sits on is skipped.
Links starting with mailto:, tel:, or javascript: are skipped.
Add the attribute data-slm-skip to any link you want to keep unchanged, for example <a href="https://example.com" data-slm-skip>.
Links that your page adds later with JavaScript, after the script has run, are not converted.
A snippet only works on the domain it was created for. A different site, or a different subdomain, needs its own domain added. Entering www.example.com or https://example.com/page is fine, it is saved as example.com.
Links change shortly after the page loads. Links converted before are remembered in the visitor's browser, so they switch instantly on later visits.
The script handles a limited number of new links per visit. If your page has many outbound links, the rest are converted over the next visits.
If a URL already has a shortlink in your account, that shortlink is reused instead of creating a new one.
Your account can connect a limited number of domains, and adding domains is limited over time. The Website Script page shows how many you've used.
When you remove a domain, its snippet stops creating new links right away. Links that visitors' browsers already remember may keep working for a while.
The Website Script page shows links shortened, total views, and estimated earnings for the last 7 days.
Check that the snippet sits before the closing body tag, still contains your data-site value, and is used on the exact domain you added. Also make sure the domain still appears in your connected sites.
Links to your own domain and links marked data-slm-skip are skipped on purpose. If you have many links, or you've hit your link creation limit, the remaining ones convert on later visits.
Enter a valid domain such as example.com. A domain you already added, a full domain list, or too many attempts in a short time will be refused. Wait a while and try again.
If you see a maintenance message, the tool is temporarily paused. Try again later.
Connect your domain and copy your snippet from the dashboard.