Skip to content
Cybersecurity

Secure Web Gateway (SWG)

A Secure Web Gateway (SWG) is a solution that mediates users' traffic to the internet, checks it against security policy and blocks threats such as malware, phishing and ransomware.

Definition

A Secure Web Gateway (SWG) is a solution that monitors and controls users’ traffic to the internet in order to stop threats such as malware, phishing and ransomware. An SWG enforces security policy for web browsing and the use of cloud applications: it decides which sites and applications are allowed, what may be downloaded and what data may leave the organisation.

An SWG sits between the user and the internet and acts as a filter: every request to a website passes through the gateway before reaching its destination, and every response before reaching the user. This kind of control matters more with hybrid work and the cloud: an employee connects to SaaS applications directly from home or a hotel rather than through the corporate network, so protection has to follow the user.

How does an SWG work?

Interception and authentication

When a user opens a website, the SWG intercepts the request, establishes who the user is and inspects the content for threats. Thanks to authentication, the policy can differ for the finance department, the IT team and guests — rules apply to people and groups, not only to IP addresses.

Control mechanisms

A typical SWG combines several mechanisms:

  • URL filtering — blocking sites by category and reputation, e.g. phishing sites, sites hosting malware or sites that breach company policy.
  • Inspection of encrypted traffic (SSL/TLS) — threats also hide in HTTPS traffic, and without decrypting it the gateway cannot see the content, only the server address.
  • Malware scanning — checking downloaded files and page content.
  • Application control — recognising web and cloud applications and restricting their functions.
  • Data protection (DLP) — detecting sensitive data in uploaded files and forms, in line with Data Loss Prevention rules.

Deployment forms

An SWG can run as a proxy server that sends and receives requests on behalf of the user’s device, as software in the company’s server room or in the cloud, or as an appliance plugged into the infrastructure. The proxy can be explicit — the browser knows about it from its configuration — or transparent, when traffic is steered to the gateway by the network without settings on the workstation. Whatever the form, the gateway works the same way: it checks traffic against a single policy.

Uses of an SWG

Protection against web threats

Phishing, malicious files and exploit pages reach the user through the browser. An SWG blocks known malicious addresses and site categories, checks downloaded files and stops connections before the threat reaches the workstation.

Visibility and control of cloud use

An SWG shows which services and applications employees use — including those IT has not approved. This is the starting point for tackling shadow IT and for deciding which tools, including AI tools, are allowed and on what terms.

Protection of outgoing data

Controlling content sent through the browser makes it possible to stop sensitive data being uploaded to a private cloud drive or to a service outside the approved list.

Remote work and SASE

An SWG is one of the components of a SASE architecture, alongside SD-WAN, ZTNA and CASB. Delivered from the cloud, it protects users in the same way in the office and outside it, and one policy covers access to the internet, cloud applications and company resources.

How does an SWG differ from a firewall?

A firewall controls traffic at the network edge using rules based on IP addresses, ports and protocols. An SWG specialises in web traffic (HTTP and HTTPS): it looks at content, site categories, applications and data, and its policies can apply to specific users. In practice the two mechanisms complement each other — in many architectures SWG functions are available on the same platform as the firewall.

Benefits and limitations

Benefits:

  • protection against malware, phishing and ransomware in web traffic;
  • visibility into internet and cloud application use;
  • one policy for users in the office and those working remotely;
  • control of outgoing data sent through the browser.

Limitations:

  • inspecting all traffic can introduce latency, especially when remote users’ traffic is routed back to a gateway at headquarters;
  • integration with existing systems takes resources and expertise, and a separate gateway alongside other tools adds to the number of consoles to maintain;
  • inspecting encrypted traffic requires preparing workstations and a well-considered exception list, e.g. for online banking and medical services.

How should an SWG deployment start?

It is worth starting in observation mode: the gateway records traffic but blocks nothing, and the team gets a picture of which services and applications the company uses. On that basis the policy is built — site categories blocked for everyone, applications allowed for selected groups, rules for AI tools and private cloud drives. Inspection of encrypted traffic is switched on in stages, together with an exception list agreed with legal and HR. Finally, you have to decide how remote users’ traffic should reach the gateway: through an agent on the workstation, through a proxy configuration file or through a cloud service.

SWG in practice — the Fortinet example

Two Fortinet products are examples of an implementation. FortiProxy is an SWG deployed in the company network as an appliance or virtual machine: it combines URL filtering, deep SSL inspection, IPS, sandboxing, inline CASB, application control and DLP with optical character recognition (OCR) for images, works as an explicit or transparent proxy and can work with FortiGate firewalls via the ICAP protocol. FortiSASE delivers SWG from the cloud — with web filtering, antivirus protection and file filtering — for managed and unmanaged devices, with or without an agent, together with ZTNA, CASB and DLP. More on the FortiSASE and FortiProxy pages.

Summary

A Secure Web Gateway controls the user’s path to the internet and cloud applications: it filters sites, inspects encrypted traffic, catches malware and guards outgoing data. It delivers the most as part of a coherent access architecture in which the same policy covers the office and remote work. We design and deploy protection of internet access as part of our Network Security service.

Tags:

SWG Secure Web Gateway URL filtering SSL inspection SASE

Want to Reduce IT Risk and Costs?

Book a consultation - we respond within 24h

Response in 24h Custom quote No obligations