An abbreviation for Common Gateway Interface, CGI is essentially a set of rules that defines how a web server communicates with other software on the same machine, and how the other software (the CGI program) communicates with the web server. The CGI-bin is simply the server directory in which CGI scripts are stored.

CGI is sometimes mistakenly referred to as a programming language, and is frequently confused with Perl and other actual programming languages. As such, a CGI script is merely a script that uses CGI; the language of the script could be Perl, MIVA, Python, PHP, or another scripting language.