A long URL is harmless on a screen, where nobody reads it and everybody clicks it. Print changes the terms: a reader of a flyer or a card has to type the address by hand, and every extra character is a chance to give up or mistype. Social posts sit in between: the link works when clicked, but a raw address with tracking parameters eats space and looks like machinery.
The standard fix is a hosted shortening service, but it rents you a link on someone else's domain, under someone else's control. There is another route if you own a domain: a short path on your own site that redirects to the long address. The Link Shortener on Ovatly builds exactly that, and this guide is upfront that the tool is not a shortening service and does not pretend to be one.
Contents
- Quick answer
- A redirect rule, not a shortening service
- 301 or 302: choose by intent
- How to create the short link, step by step
- Worked example: one permanent rule
- Short links for print
- Short links for social posts
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
The Link Shortener does not shorten a link the way a hosted service does. It generates a redirect rule file for a domain you own: add a row with a short path, the full destination and a status of 301 or 302, choose the format your hosting uses (Cloudflare or Netlify _redirects, Apache .htaccess, or Nginx rewrite rules), place the file on your site, and test the path. Your domain plus that short path then sends visitors to the long destination.
A redirect rule, not a shortening service
A hosted shortener keeps a database on its own servers: your long URL goes in, a short code on the service's domain comes out, and the service performs the redirect for as long as it chooses. Your link's life depends on their database and their company.
The redirect rule approach moves that job onto hosting you already have. The tool writes the configuration your hosting already understands: a line in a _redirects file, an .htaccess rule or an Nginx rewrite that sends anyone visiting this short path on your domain to the full destination. There is no database, no account and nothing hosted by Ovatly. The trade is honest in both directions: you keep full control and owe nothing to a third party; in return, the link exists only once the file is live on your hosting, and the file counts nothing.
301 or 302: choose by intent
Each row carries a status, and the choice is about how permanent the link is. A 301 redirect is permanent: it tells browsers and search engines the destination is the lasting home of this path, and search engines transfer ranking signals through it. Use 301 for links you intend to keep forever, which includes almost anything printed, because print cannot be recalled and edited.
A 302 redirect is temporary. Use it for seasonal or experimental links: a holiday offer, a campaign you will retarget, a destination you expect to swap. The status tells browsers not to treat the pairing as settled. Decide per link, not per file.
How to create the short link, step by step
- Open the Link Shortener. Optionally type your domain first to preview how the short links will look; the preview is the only thing the domain is used for.
- Add one row per short link: the short path (like
/guide), the full destination, and 301 for permanent or 302 for temporary. - Choose the configuration format that matches your hosting:
_redirectsfor Cloudflare or Netlify,.htaccessfor Apache, or rewrite rules for Nginx. - Copy or download the generated block and place it on your site as the file header instructs. If your host already has a
_redirectsor.htaccessfile, add the lines to it rather than replacing it. - Test a short path in your browser before you print or post anything.
Worked example: one permanent rule
Say a long guide lives at https://example.com/long-guide and you want the short path /guide on your domain to reach it, permanently. The row is: short path /guide, destination https://example.com/long-guide, status 301. In Cloudflare or Netlify format, the generated _redirects file contains this rule line:
/guide https://example.com/long-guide 301
Save that file in the root of a Cloudflare Pages or Netlify site, and visiting your domain's /guide path sends visitors to the long guide. The whole mechanism is that one line: a path, a destination and a status. Every other format says the same thing in its hosting's dialect.
Short links for print
Print is the strictest test a link can face, because the reader is the redirect mechanism: they read the address and type it. A short path on your own domain passes that test in a way a long URL never will. Keep the path short, and made of plain words a reader can hold in memory between page and keyboard.
Print is also permanent in a way screens are not: a poster, a card or a package insert keeps circulating its link long after a campaign page would have been edited. That is why printed short links deserve the 301 status and a destination you will keep alive, or redirect onward if it moves.
Short links for social posts
On social platforms the same rule file serves the link wherever it is posted; nothing platform-specific needs configuring. The short path carries your domain instead of a shortener's, so the link names your site in every post, bio and comment it appears in.
The destination does not have to live on the same site: the short path is on your domain, but it can point to any full URL, including another site entirely, such as a video channel or a booking page. One domain can therefore carry the short, typeable version of every long address you share.
Limitations and honest tradeoffs
Nothing here is hosted by Ovatly: no database, no account, no click tracking, and no short link works until the generated file is live on your hosting. If your hosting accepts none of the generated formats, the tool cannot place the rules for you.
The redirect file itself records nothing: it forwards visitors and forgets them, so there are no click statistics in it. Your hosting or analytics platform sees each visit to the short path, and that is where visits are counted, for example as page views of the path.
You also need a domain and hosting you control; that is the price of the control this approach gives, and it is why hosted shorteners exist. If you have neither, a hosted service is the practical option; if you have both, the rule file cannot be taken away from you.
Common mistakes
- Replacing an existing rule file. Overwriting an existing
_redirectsor.htaccessfile deletes rules your site depends on. Add the new lines to it instead. - Using 302 for a printed link. Print cannot be updated. A link that will circulate on paper for years should be a permanent 301 with a destination you will keep alive.
- Printing or posting before testing. One mistyped character in a destination stays invisible until a reader hits it. Test every short path in a browser first.
FAQs
Does this tool shorten my link the way a hosted shortener does? No. A hosted shortener keeps your redirect on its own servers and domain. This tool instead generates a redirect rule file for a domain you own, so the short link is your domain plus a short path, and the redirect runs on your hosting, under your control.
Should I use 301 or 302 for my short link? Use 301 for a link you intend to keep forever; search engines transfer ranking signals through a permanent redirect. Use 302 for seasonal or experimental links that you plan to change or remove.
Will I get click statistics for my short links? Not from the redirect file itself, which only forwards visitors. Your hosting or analytics platform sees each visit to the short path, so count the visits there, for example as page views of the short path.
My host already has a _redirects or .htaccess file. What should I do? Add the new rule lines to the existing file rather than replacing it. Replacing the file would delete the redirects and rules your site already depends on.
Can the destination be a page on a different website? Yes. The short path lives on your domain, but the destination can be any full URL, including a page on another site entirely, or a path on the same site.
Conclusion
Shortening a long URL with your own domain is a small piece of infrastructure you own outright: one rule per link, a status chosen by intent, and a file no service can discontinue. Print readers get an address they can type, and social posts get a link that carries your name. The page that link lands on still has to look the part: our guide to extracting a color from a product photo for your store theme covers the visual side of that job. For more guides in this series, see our URL and Link Tools guides.
References
- Cloudflare Pages documentation, on redirects and the
_redirectsfile: https://developers.cloudflare.com/pages/configuration/redirects/ - Netlify documentation, on redirect rules and their options: https://docs.netlify.com/routing/redirects/