Pastebin raw.php?i= not working: use /raw/ instead
Old pastebin.com/raw.php?i=CODE links return 404 or empty text. Switch to pastebin.com/raw/CODE, then check 403 errors, expired pastes and script settings.
The Liite team6 мин чтения
Short answer
Replace https://pastebin.com/raw.php?i=CODE with https://pastebin.com/raw/CODE, keeping the same paste code. If your code gets a 403 Forbidden instead of a 404 or blank page, the URL format is not the problem, so work through the 403 section below.
Your Tabletop Simulator model won't load, your ComputerCraft script downloads nothing, or an old tutorial's download line returns a blank page. The link looks like this:
pastebin.com/raw.php?i=CODE
Why it happens
Pastebin used to serve raw text from a script called raw.php, with the paste ID in the i query parameter. As of July 2025, people on Reddit report that these old URLs return a 404 or an empty response, and that the /raw/CODE form works. A ComputerCraft thread presents the URL change as the solution. A Tabletop Simulator thread describes models not loading from Pastebin links. The same change is the likely fix there, though that thread does not clearly confirm it.
We don't know whether Pastebin removed the old route on purpose, and we can't say whether it will come back. Plenty of old scripts, mods, game saves and forum posts still contain the old format, which is why the problem appears in so many unrelated places.
The 403 case is separate. A Stack Overflow question describes "Error 403 Forbidden" when fetching Pastebin links from C# or Java code. A 403 means the server understood the request and refused it. Pastebin may be rejecting requests it considers automated, but that is an inference. We haven't seen Pastebin document it.
| Symptom | Likely cause | Fix |
|---|---|---|
404 or blank page on raw.php?i= | Old URL format | Use /raw/CODE |
| Works in a browser, 403 from code | Client refused by the server | See the 403 steps below |
404 on /raw/CODE too | Paste deleted, expired or private | Recreate it or ask the author to repost |
| Old link inside a save or mod | URL stored in the file | Edit the stored URL |
Step-by-step fixes
Fix 1: switch to the /raw/ format
- Find the paste code. It is the part after
i=in the old link. Forpastebin.com/raw.php?i=aB3dE5fG, the code isaB3dE5fG. Copy it exactly, including capitals. - Build the new URL by putting the code after
/raw/:
https://pastebin.com/raw/aB3dE5fG- Open it in a browser first. You should see plain text with no page around it. If you do, the paste exists and the URL is right.
- Replace the old link wherever it lives. That might be a Lua script, a Tabletop Simulator object's script or model URL, a config file or a mod's source. Search the file for
raw.php?i=and edit each match. - Keep
https. If your old link usedhttp://, change that too.
For ComputerCraft, look for a hard-coded URL in an http.get call or a similar download line. For Tabletop Simulator, edit the URL field of the model, image or script that points at the paste.
Copy instead of typing
The raw button on a paste page opens the plain-text version at the /raw/CODE address. Copy the address from there to avoid typos in the code.
Fix 2: if you still get 403 Forbidden from code
Work through these in order:
- Check the same URL in a browser. If it loads there, the paste is fine and your client is being refused.
- Send a User-Agent header. Some servers reject requests that carry none, or only a default library one. Whether this helps with Pastebin is unconfirmed, so treat it as something to try, not a guaranteed fix.
- Slow down. A script that fetches many pastes in a tight loop is more likely to be treated as abusive. Fetch once and cache the result.
- Check Pastebin's own pages. Rules for automated access can change. Look at Pastebin's help and API documentation for current terms, and check whether the paste owner has deleted it or made it private.
Fix 3: check whether it's your link or the paste
Before you edit twenty files, test with a known-good paste. Make a small one yourself, open its /raw/ address, and run your script against it. If that works, your code and network are fine and the original paste is the problem: deleted, expired, private or removed for a rule violation.
Expired pastes are a common cause with old tutorials. Many pastes shared years ago were set to expire, and no URL format will bring them back. If the author is still around, ask them to repost it. Otherwise you will have to recreate the content.
The old link may be baked into a save
In Tabletop Simulator saves and mods, the broken URL is stored inside the file. Reinstalling the game won't change it. Edit the URL in the object, or re-save after fixing it.
What won't help
- Changing only the code. A wrong URL format gives a 404 or blank page even with a correct code.
- Clearing your browser cache. The old route fails on the server, so your cache is irrelevant.
- Reinstalling the game or mod. The broken URL comes back with the save, script or mod file.
- Wrapping the old URL in a link shortener. It will redirect to the same dead address.
Checklist before you try again
- The URL starts with
https://pastebin.com/raw/followed by the code. - The code matches the original exactly, capitals included.
- The address opens as plain text in a browser.
- Every copy of the old link is replaced, including ones in saved games and config files.
- If the request comes from code, it sends a User-Agent and isn't fired in a tight loop.
If nothing works
If the /raw/ address fails in a browser too, the paste is probably gone, so contact whoever shared it. If it works in a browser but code still gets 403, contact Pastebin through its help or contact page. Include the exact error, the time, the paste URL and what you already tried. If a game mod or tutorial is the source, tell its author so they can update it.
Hello,
Requests to https://pastebin.com/raw/CODE return "403 Forbidden" from my
script, but the same URL opens fine in a browser. The old raw.php?i=CODE
format also fails. I tested at [date and time, time zone] from [country/ISP].
The client is [language/library], and I send a User-Agent header
[yes/no]. Is automated access to /raw/ URLs supported, and are there rate
limits I should respect?
Thanks.Common questions
Will the old raw.php link start working again?
We can't tell. Reports describe it as broken as of July 2025, and we haven't seen Pastebin announce anything either way. The /raw/ form is the safer bet regardless.
Does this affect pastes I own?
Only the links that point to them. The paste is unchanged, so you only need to update wherever you linked it.
Is /raw/ the same as the raw button on the paste page?
Yes, that button opens the plain-text version using the /raw/CODE pattern. You can copy the address from there.
Why does it work in my browser but not in my script?
A browser sends headers and behaves like a person. A bare script may send none, and the server can refuse it with a 403. Try the User-Agent and rate steps above.