Save a web link as a file on a Mac, and what a webloc is
· 6 min read
To save a link to the desktop on a Mac, drag the address out of your browser’s address bar and drop it on the desktop or into any Finder folder. macOS creates a file named after the page, ending in .webloc. Double-click it later and the page opens in your default browser.
That is the whole trick, and it has been part of macOS for a long time. The rest of this covers what a webloc actually is, where it earns its place, where it falls short, and when you want a copy of the page rather than a pointer to it.
Drag the address out of the browser
- Open the page in Safari or whichever browser you use.
- Press and hold on the address in the address bar, then drag it out of the window. A preview of the link follows the pointer.
- Drop it on the desktop or into a Finder window.
Links inside a page work the same way. Drag any link from the page onto the desktop and you get a webloc for the page it points to, without opening that page first.
The new file takes the page’s title as its name. Rename it like any other file (select it and press Return) to something you will recognize in six months; the address inside does not change.
If dragging feels fiddly on a trackpad, drag and drop not working on a Mac covers the settings that make it easier, including dragging with three fingers instead of holding a click.
What a webloc file actually is
A webloc is a short property list, the same structured text format macOS uses for app settings, holding one thing: the address. It is not a copy of the page. It is a pointer to it.
Double-clicking it hands the address to your default browser, which you choose in System Settings, Desktop & Dock, Default web browser.
To read the address without opening anything, type this in Terminal, adding a space at the end, then drag the webloc into the Terminal window to fill in its path, and press Return:
plutil -p
It prints the address stored inside. That is handy for checking where an old link points before you open it, because a webloc’s name says nothing reliable about its destination.
Where a saved link earns its place
Next to the files it belongs to. A project folder can hold the brief, the drafts, and weblocs for the shared document, the tracking page and the reference material. Everything about the project sits in one place, and Finder tags, Spotlight and sorting work on weblocs like any other file.
In the Dock. Drag a link to the right-hand side of the Dock, near the Trash, and it stays there as a one-click shortcut. That suits the handful of pages you open every day.
As a reading pile. A folder of weblocs is a reading list that belongs to no particular browser. Switch browsers and they still open, in whichever one is now the default.
Where it falls short
It is only a pointer. If the page moves, changes or disappears, the webloc opens whatever is at that address now, or an error. For anything you need to keep, save the page itself, as described in the next section.
Other computers do not understand it. Windows uses its own shortcut format and will not open a .webloc, and many web apps show one as an unknown file. To send someone a link, paste the address into the message rather than attaching the file.
The name can mislead. Because you can rename a webloc freely, the name is a label, not a promise. That is fine for your own files. For one somebody else sent you, check the address inside before you open it.
Saving the page instead of the link
When the content matters more than the address, keep a copy of the page. In Safari:
- File, Export as PDF saves the page as it looks, as a single PDF. It is the simplest way to keep a receipt, a booking confirmation or an article.
- File, Save As, with Format set to Web Archive saves the page and its images in one .webarchive file that opens in Safari, including offline.
- Reading List can keep a readable copy of anything you add to it, if you turn on the option in Safari’s settings to save articles for offline reading automatically.
None of these update when the original page changes, which is exactly the point. A saved PDF of a confirmation page is still there after the site has moved on.
Gathering links and files together
The drag-to-desktop habit has one annoyance: the desktop fills up with weblocs you meant to file somewhere else, and the link you need is on one screen while the folder it belongs in is on another.
Ledge turns the MacBook notch into a shelf for exactly that moment. Drag a link up to the notch and let go; it waits on the shelf alongside any files, folders or images you add from other apps and folders. When you are ready, drag the lot into a project folder: files move there, and the link arrives as a webloc. Drop the same link into a text field instead and it arrives as the plain address, ready to paste into a message.
Ledge opens with Option-Space or a click on the notch, works on Macs without a notch (the shelf sits at the top center of the screen), keeps everything on the Mac, and needs macOS 14 Sonoma or later. It is free for 14 days, then $19 once. Collecting files from different folders before you send them covers the same gathering job using only what macOS provides.
Questions
Can I change where a webloc points? Not from Finder. The simplest route is to open the correct page, drag a fresh webloc out of the address bar, and delete the old one.
Why does my webloc open in the wrong browser? It always opens in the default browser. Change that in System Settings, Desktop & Dock, Default web browser.
Do weblocs sync through iCloud Drive? Yes. They are ordinary files, so they sync like any other and open the same way on your other Mac.
Is a webloc safe to open? It opens an address, which carries the same risk as clicking that link anywhere else. Treat one you did not make yourself like any link from someone else, and check where it points first.