# How should I cite a website URL?

I am currently writing a report and I have been compiling a list of references (from IEEE mostly) and I also have a number of websites.

My question is, what is the best way to note a website URL? Would it be to reference and cite a URL, would it be adding a footnote? An example would be a reference to google.com. Would it be the correct to just create a footnote?

I've started to just add a footnote each time a website is mentioned (using LaTeX) so for example if a javascript plugin is mentioned then a footnote would be added to the website URL. How would be best to do this as it would not suffice as a reference as it is just noting a website for further reading. I do not have time to waste be writing the whole report to then have to go back through and edit the document hence my question.

• Question is not very clear. Or perhaps you are answering your own question. Why not use a footnote combined with \url{} (from the url package)? – Dave Clarke Feb 19 '13 at 16:49
• In addition to Dave's advice (which is what I basically do in most circumstances) - it isn't that crazy to just cite a website. See some examples in APA here. – Andy W Feb 19 '13 at 17:08
• Oh sorry, the question was supposed to say what is the best way to note a website url? Would it be to reference and cite a url, would it be adding a footnote? an example would be to reference to google.com. Would it be the correct to just create a footnote? – Callum Feb 19 '13 at 17:44
• Why doesn't a web site suffice as a reference? Isn't every reference just noting a document for further reading? – JeffE Feb 19 '13 at 18:14
• As a meta-comment, if you are trying to produce a high-quality, well-written report, then trying to avoid having to go back and edit anything is a questionable strategy. Maybe it doesn't matter (some things just need to be recorded crudely, and polishing them is irrelevant), but the last sentence of the question ("I do not have time to waste...") seemed a little worrisome. – Anonymous Mathematician Feb 19 '13 at 21:34

I suppose the easiest way would be to use the \newcommand command in LaTeX.

Put something like this before your \begin{document}:

\newcommand{\jquerynote}{\footnote{\url{http://jquery.com}}~}


Use it as follows.

We used JQuery\jquerynote to build the user interface.


If you want to change the reference to a citation or another format, you can replace the contents of the \newcommand

As far as to "What is the best way to cite a website URL?" the answer generally is that there isn't a standard. Personally, I use web sites as a citation if it contributes some kind of important intellectual argument to the paper. If I use web sites as a footnote, it's because it has to do with some kind of tool I used and is there simply to inform the user that I used Tool XYZ.

Using your example, if I said in my paper, "We used the Google search engine to identify evidence of bias in search engine results" I'd probably put that as a footnote, whereas if I said, "Company web sites from Google, Microsoft, and Apple about employment all state that having fun at work is important" may be citations.

(I should finally note that this is a personal convention rather than anything spelled out in a styleguide, but maybe it helps you?).

• I'm not really a fan of this solution. To me the more correct approach would be to simply include the link as a citation in the references section. This is a nice hack, but it's not standard. – eykanal Feb 21 '13 at 16:28
• I initially answered the question addressing it as the problem of, "I don't know if I want to make it a footnote, or a citation, and I want to make it easy to switch out later". With respect to URLs in citations, that works in certain documents, but it actually can make your references look weak to some reviewers if they scan the citations and see a handful of URLs. – Irwin Feb 21 '13 at 21:58
• If it's the right reference, then it's the right reference, no matter what the reviewer thinks. Cite it. – JeffE Feb 21 '13 at 23:12
• Thankyou @Irwin. You used jQuery as an example and thats what i've been doing and linking mostly to github repos – Callum Feb 22 '13 at 11:44

Echoing the comments and other answers, citing a website is no different to citing any other resource, such as a book, or a paper. Depending on your favorite text editor and reference manager, you would like to produce bibliographic entries, such as

... for the implementation of the prototype, we used the Ruby programming language [23] and ...
...
...
Bibliography
...
23. Matsumoto, Yukihiro. Ruby Programming Language. http://www.ruby-lang.org/, 2009.

In BibTeX, there's @misc entry for that. You would use it as follows:

@misc{links/Java,
author = {{Sun Microsystems Inc.}},
title = {{J}ava{\texttrademark} {P}latform, {S}tandard {E}dition 6},
howpublished={\url{http://java.sun.com/}},
month{jun},
year = {2006}
}

author = {{W3C}},
title = {{Extensible Markup Language (XML) 1.0}},
howpublished = {\url{http://www.w3.org/TR/REC-xml/}},
publisher = {World Wide Web Consortium},
year = {2008},
month = {November}
}


Since websites are a dynamic resource, you should always include the date (year/month) of the last retrieval.

For the url, the code above would assume \usepackage{url}.

Another technical issue with this is whether your chosen bibliography style would include the URL in the reference, or not. You might want to consult this questions at tex.SE

• I use a modified BibTeX style that parse two additional fields: url (for bare URLs, as in Marc van Dongen's answer) and arxiv (for ArXiv document IDs). – JeffE Feb 21 '13 at 23:14
• +1 for stating the last retrieval. If it's a URL to a discussion, the consensus on that thread may change after you access it. If it just vanishes, having a URL and a known date when it did exist gives you an key for the Wayback Machine at web.archive.org – Emyr Oct 11 '13 at 9:23
• @Emyr You always have to include a date of retrieval for an URL, otherwise the citation is invalid. – yo' Oct 29 '14 at 11:55

I wouldn't use footnotes because they are disruptive. Also this may lead to an abundance of repetition in your document, with the same footnote appearing over and over again.

Instead, I suggest you treat URLs as normal references.

The biblatex packages provides support for URL references. Another advantage of using the package is that it lets you create a separate bibliography for the URLs. This is not explained here.

The package supports values for url, date, and urldate keys in your BibTeX database.

• url describes the URL.
• date describes the official date.
• urldate describes the date you visited/retrieved the URL.

The package also lets you customise the text in the bibliography that precedes the value for urldate. For example, you can set it to Visited or Retrieved. Customising the string is done by setting the bibliography string urlseen.

The following is based on an example from Marco Daniel. It shows the basic mechanism. Save it, run LateX on it, then bibtex, and LaTeX.

\documentclass{article}

\RequirePackage[style=authoryear,
useprefix=true,
backend=bibtex,
block=space,
language=british]{biblatex}
\renewcommand*{\bibopenparen}{[}
\renewcommand*{\bibcloseparen}{]}
\renewcommand*{\finalandcomma}{,}
\renewcommand*{\finalnamedelim}{, and~}
% 3em recommended by Bringhurst, p 80.
\renewcommand*\bibnamedash{\rule[0.48ex]{3em}{0.14ex}\space}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Online{ctan,
label       = {CTAN},
title       = {CTAN},
subtitle    = {The Comprehensive TeX Archive Network},
date        = {2006},
url         = {http://www.ctan.org},
urldate     = {2012-04-07},
}
\end{filecontents}

\DefineBibliographyStrings{english}{%
urlseen = {Retrieved},
}

\begin{document}
I always get my {\LaTeX} packages from
the Comprehensive {\TeX} Archive Network~\parencite{ctan}.

\printbibliography
\end{document}


The \parencite command is for parenthetical citations. (biblatex also provides other kinds of citation commands.) The filecontent related stuff makes the example a standalone example (so you won't have to create the BibTeX file). The command is not recommended for day-to-day LaTeX.

If you are using BibTeX to maintain your bibliography, you might want to use the IEEEtran bibliography style, which takes care of the url field in the BibTeX entries by adding an [Online] tag in the bibliography followed by the given url.

Given that web content disappears, you could cite the Internet Archive URL, e.g., https://web.archive.org/web/19981111184551/http://google.com/ rather than http://google.com/ (I bet you can't remember Google looking like that!) This also ensures that the content you cite is the content your readers see.