To cite a website in a STEM paper, you record who wrote it, when, its title, where it lives and, for changing pages, when you saw it. The same logic covers documentation, code repositories and online tools.
This page shows what to record, when web sources are acceptable, and how to cite the online sources STEM students use most in APA 7th edition and Harvard (as commonly taught in UK universities). Follow your course handbook where it differs.
The Five Things Every Web Citation Needs
- Author: a person, a team or an organization.
- Date: when the page was published or last updated, or "n.d." if none is given.
- Title: of the page, document or tool.
- Source: the website or platform name, and the URL.
- Access date: needed in Harvard, and in APA only for pages designed to change.
When Web Sources Are Acceptable
Web sources are fine in STEM work when they are the original or most authoritative source. Official documentation, standards bodies, government agencies and data repositories are usually acceptable.
General explainer sites, blogs and encyclopaedias are weaker. Use them to find primary sources, then cite the journal article or official document instead.
A useful test: would a specialist in your field accept this page as evidence? If not, find a better source for the same fact.
Elements to Record as You Go
| Source type | Record these details |
|---|---|
| Web page | Author or organization, date, page title, site name, URL, date accessed |
| Software or package | Developer, year, name, version number, publisher, URL |
| Documentation | Organization, date or version, page title, URL, date accessed |
| Code repository | Owner, year, repository name, version or commit, URL |
| Forum answer | Username, exact date, post title, site, URL |
| Video | Uploader, date, title, platform, URL |
Version numbers matter in STEM. Results can change between versions of a library, so a reader needs to know exactly which one you used.
Web Pages
A standard web page is the simplest case. These examples use an invented organization and the reserved example.org domain.
APA 7: Northfield Water Authority. (2024, May 4). How we test drinking water quality. https://www.example.org/water-testing
APA 7 in text: (Northfield Water Authority, 2024)
Harvard: Northfield Water Authority (2024) How we test drinking water quality. Available at: https://www.example.org/water-testing (Accessed: 2 October 2026).
Harvard in text: (Northfield Water Authority, 2024)
In APA, leave out the site name when it is the same as the author, as here. Add a retrieval date only for pages that are designed to change, such as live data dashboards.
Software and Documentation
Cite software when you used it in a way that affects your results, such as a statistics package or simulation tool. Common tools like a word processor do not need citing.
APA 7, software: R Core Team. (2023). R: A language and environment for statistical computing (Version 4.3.1) [Computer software]. R Foundation for Statistical Computing. https://www.R-project.org/
APA 7, documentation page: Python Software Foundation. (n.d.). statistics: Mathematical statistics functions. Python 3 documentation. Retrieved October 2, 2026, from https://docs.python.org/3/library/statistics.html
The retrieval date appears in the documentation example because the page has no date and is updated as the language changes. Many packages also suggest their own preferred citation; in R, run citation("packagename") to see it.
Code Repositories and Reused Code
If you reuse or adapt someone else's code, cite it in your report and acknowledge it in a comment in the code itself. This protects you from plagiarism concerns and helps readers.
APA 7: Okafor, N. (2025). signal-filter-tools (Version 2.1.0) [Computer software]. GitHub. https://github.com/example/signal-filter-tools
# Butterworth filter set-up adapted from Okafor (2025), # signal-filter-tools v2.1.0, filters.py, lines 40 to 58.
Check the repository's license before reusing code. Some licenses require you to keep the original copyright notice.
Stack Overflow, Videos and Online Lectures
Forum answers and videos can be cited, but they are rarely strong evidence. Cite them when you use a specific idea, solution or demonstration from them.
APA 7, forum post: codewalker42. (2024, March 9). Why does floating-point addition give 0.30000000000000004? [Online forum post]. Stack Overflow. https://stackoverflow.com/questions/000000
APA 7, video: Northfield University Physics. (2023, January 15). Measuring g with a simple pendulum [Video]. YouTube. https://www.youtube.com/watch?v=example
Use the username exactly as shown if there is no real name. For recorded lectures from your own course, check your handbook; some courses prefer you to cite the slides or reading instead.
Citing AI Tools
If your course allows AI tools, it will usually tell you how to acknowledge them. APA suggests citing the company as the author and the model as the title.
APA 7 pattern: Company. (Year). Model name (Version) [Large language model]. URL
Describe in your methods or an appendix how you used the tool and what you asked it. Always check your institution's academic integrity policy first, because rules on AI use vary widely.
Pages That Change or Disappear
- Save a PDF or screenshot of key pages for your own records.
- Use an archived copy if the live page has gone, and cite the archived URL.
- Prefer a DOI or permanent identifier where one exists, as for datasets in repositories.
- For live data, note the exact date and time you retrieved the values.
Common Mistakes
| Mistake | Fix |
|---|---|
| Citing only a bare URL | Give author, date, title and source as well |
| No version number for software | Record the version you actually used |
| Citing a summary site instead of the original | Trace the fact back to its primary source |
| Reused code with no acknowledgment | Cite it in the report and comment it in the code |
| Mixing APA and Harvard details | Pick the required style and follow it throughout |
How STEM Donkey Helps with Citing Online Sources
Send the brief, the sources you have used (links, software versions and repositories), and your required style and edition.
You receive a custom paper written from scratch with web pages, documentation, software and code cited correctly, plagiarism-checked. It is for study and reference. Free revisions within the scope of your original request are included.
Want Every Online Source Cited Correctly?
Send your brief and sources. You get a custom paper with web pages, software and documentation cited in your required style.
Order Your Referenced PaperFree revisions · Full refund if late · Written from scratch for your order
Frequently Asked Questions
In Harvard, yes. In APA 7, only for pages designed to change over time, such as live dashboards or undated documentation.
Use the organization responsible for the site as the author. If there is truly no author, APA moves the title into the author position.
Write "n.d." for "no date" in place of the year, in both APA and Harvard.
Yes, when they shaped your analysis. Give the version number, and use the package's preferred citation if it provides one.
You can, as an online forum post, but it is weak evidence. Use it to acknowledge a specific solution you used, not to support scientific claims.
Cite the repository in your reference list with its version, and add a comment in your code saying what you adapted and from where.