Citing online sources follows the same basic logic as citing print sources: you need to tell readers who created the content, when it was published, what it’s called, and where to find it. The difference is that online sources often lack one or more of those details, and the “where to find it” element is a URL or DOI instead of a page number. Here’s how to handle the most common scenarios across major citation styles.
The Core Elements Every Online Citation Needs
Regardless of which style you’re using (APA, MLA, Chicago, or another), every online citation tries to capture the same four pieces of information: author, date, title, and source location. For a standard webpage or online article, that looks something like this:
- Author: The person or organization that created the content.
- Date: When the content was published or last updated.
- Title: The name of the page, article, or post.
- Source location: The URL, DOI, or database name that lets a reader find the original.
Each citation style arranges these elements in a slightly different order and uses different punctuation, but the underlying information is the same. If you nail down these four pieces before worrying about formatting, the rest is just following a template.
When the Author or Date Is Missing
Online sources frequently lack a named author, a clear publication date, or both. Here’s the standard approach, based on APA guidelines that most other styles mirror in spirit.
If there’s no author listed, move the title of the work to the front of the citation where the author’s name would normally go. Don’t substitute “Anonymous” unless the work is literally signed “Anonymous.” Your in-text citation would then use a shortened version of the title in place of the author’s last name.
If there’s no date, use “n.d.” (short for “no date”) in the spot where the year would appear. In MLA style, you simply omit the date element. If both the author and date are missing, combine these approaches: title first, then “n.d.” for the date.
Here’s what that looks like in practice for an APA-style reference:
- No author: Title of article. (2024). Website Name. https://example.com
- No date: Last Name, F. M. (n.d.). Title of article. Website Name. https://example.com
- No author or date: Title of article. (n.d.). Website Name. https://example.com
DOIs vs. URLs
A DOI (Digital Object Identifier) is a permanent link assigned to academic journal articles, books, and other scholarly works. It looks like a URL but starts with “https://doi.org/” followed by a string of numbers and letters. Unlike regular URLs, DOIs don’t break when a website redesigns or moves content.
If a source has a DOI, always use the DOI instead of the URL, even if you found the work through a different website. If a source has both a DOI and a URL, include only the DOI. You don’t need to add “Retrieved from” or an access date before a DOI or URL in APA style. Just paste it at the end of the reference entry.
Access dates are only necessary in specific situations. APA requires a retrieval date when the content is designed to change over time and isn’t archived, like a social media profile or a wiki page. For stable content like a published article or a government report, skip the access date.
Citing Websites and Online Articles
For a standard webpage or online news article, the format in APA style is:
Author Last Name, First Initial. (Year, Month Day). Title of article. Website Name. URL
In MLA style, the format is:
Author Last Name, First Name. “Title of Article.” Website Name, Day Month Year, URL.
Notice the differences: APA italicizes the title of a standalone webpage, while MLA puts it in quotation marks and italicizes the website name. APA uses an initial for the first name, MLA spells it out. These small details matter when your professor or editor is checking formatting, so match your required style exactly.
Citing Social Media and Video Content
Social media posts, TikTok videos, YouTube clips, and similar content follow a modified format. In APA style, you list the author’s real name first, then put their social media handle (starting with the @ sign) in square brackets. For the title, use the first 20 words of the post’s caption. Count URLs, hashtags, and emojis within the caption as one word each.
A TikTok citation in APA would look like this:
Last Name, F. M. [@handle]. (Year, Month Day). First 20 words of the caption [Video]. TikTok. URL
For a TikTok profile page rather than a single video, add a retrieval date because profile content changes over time. Use the first 20 words of the bio as the title, and include “[TikTok profile]” in square brackets after it. If the bio is empty, just use “[TikTok profile]” as the title element.
YouTube videos follow a similar pattern: the channel name acts as the author, the video title serves as the title element, and you include the URL. In MLA style, you’d format it as: “Title of Video.” YouTube, uploaded by Channel Name, Day Month Year, URL.
Citing AI-Generated Content
If you used ChatGPT, DALL-E, or another generative AI tool in your research or writing, most style guides now have specific rules for citing that content.
MLA’s approach is straightforward: don’t treat the AI as an author. Instead, describe what you asked the tool to generate, and structure the citation around the tool and the prompt. The MLA format looks like this:
“Describe your prompt here” prompt. Tool Name, model version, Publisher, Day Month Year, URL.
For example: “Describe the theme of nature in Jane Austen’s Mansfield Park” prompt. ChatGPT, model GPT-4o, OpenAI, 23 Sept. 2024, followed by a shareable link to the conversation.
Name the specific model version (GPT-4o, for instance, not just “ChatGPT”) so readers know exactly what generated the output. Many AI tools let you create a shareable link to the conversation. If the tool doesn’t offer a stable URL, provide the general URL for the tool itself.
One important note: if the AI cites secondary sources in its response, you should track down and verify those sources yourself. AI tools don’t always cite accurately, and they sometimes fabricate references entirely. If you rely on an AI summary that references other works and you haven’t checked those works directly, acknowledge that you’re citing them secondhand.
Quick Reference by Source Type
Here’s a simplified cheat sheet for the most common online sources, using APA formatting conventions:
- Online journal article: Author. (Year). Title of article. Journal Name, Volume(Issue), Page range. DOI
- Webpage: Author. (Year, Month Day). Title of page. Website Name. URL
- Social media post: Author [@handle]. (Year, Month Day). First 20 words of post [Type of post]. Platform Name. URL
- YouTube video: Channel Name. (Year, Month Day). Title of video [Video]. YouTube. URL
- Online book: Author. (Year). Title of book. Publisher. DOI or URL
- AI-generated content (MLA): “Prompt text” prompt. Tool Name, model version, Publisher, Date, URL.
Getting the Details Right
The most common formatting errors in online citations are small but noticeable: forgetting the period after a closing bracket, italicizing the wrong element, or including “Retrieved from” when it’s not needed. Before submitting any paper, check your citation style’s official guide for the exact punctuation and order. APA’s style guide is at apastyle.apa.org, MLA’s is at style.mla.org, and the Chicago Manual of Style is at chicagomanualofstyle.org. Each site includes searchable examples for nearly every source type you’ll encounter.
If you’re using a citation manager like Zotero, Mendeley, or the built-in tools in Google Docs and Microsoft Word, double-check the output against the official style guide. These tools are helpful but occasionally produce outdated formatting, especially for newer source types like AI-generated content and social media posts.

