S7-1200 Webserver: Set User-Defined Default Page via AWP

David Krause12 min read
S7-1200SiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

The SIMATIC S7-1200 CPU integrates a built-in web server that exposes diagnostics, tag values, and user-defined visualization pages to any browser on the network. Out of the box, navigating to http://<CPU-IP> in a browser returns the Siemens "Introduction" page, which links to diagnostics, tag status, watch tables, online backup, and the user-defined pages folder. In many operator-facing deployments, that landing page is undesirable: maintenance personnel only need a custom alarm overview, while engineers may want to reach the diagnostics tree without seeing the customer-specific dashboard first.

This reference documents how to redirect operator browsers to a user-defined HTML page created with the Automation Web Programming (AWP) syntax, how to lock the rest of the web server behind a password, and how to verify the configuration on a live CPU. The procedures apply to firmware V4.0 and later of the S7-1200 CPU family (including the S7-1200 G2 generation) when programmed in TIA Portal V15.1 or newer. Official guidance is published in the SIMATIC S7-1200 Programmable Controller - Web Server manual collection.

Prerequisites

  • CPU: S7-1200 (any variant) with firmware V4.2 or later. AWP syntax and the user-defined web pages DB were extended in V4.0; HTTPS support was added in V4.2.
  • Engineering: TIA Portal V15.1 or newer with the matching HSP for the CPU in use.
  • Web server must be enabled in the CPU device configuration (Properties → Web server → Activate web server).
  • Ethernet interface (PN interface) configured with a static IP address in the same subnet as the browser host.
  • HTML editor with UTF-8 support; do not use rich-text editors that inject proprietary markup.
  • Read/write access to the S7-1200 project; the user-defined web pages DB is generated and downloaded with the program.

S7-1200 Web Server URL Architecture

The web server on the S7-1200 exposes several logical trees, each addressable through a fixed URL prefix. Understanding the namespace is required before any default-page redirect can be configured.

URL Prefix Source Typical Use
/ Siemens default "Introduction" page Entry point, language switcher, links to all other standard pages
/Portal/Portal.mwsl Siemens Web-frontend framework Diagnostics, online backup, module information
/awp/<name>/<file>.html User-defined AWP web pages DB Operator dashboards, alarm overviews, custom HMIs
/favicon.ico Siemens default Browser tab icon

Per the Siemens manual collection, you can access the S7-1200 standard web pages from a PC or from a mobile device through the IP address of the S7-1200 CPU or any web server-enabled device on the same subnet. A request to the bare IP, e.g. http://192.168.0.200/, is served the Introduction page. Browsers, kiosks, and SCADA thin clients that need a single landing page must therefore be pointed at the explicit /awp/... address of a user-defined page.

AWP Command Syntax and Project Layout

User-defined pages are normal HTML files that contain a small set of AWP commands parsed by the CPU at download time. The commands are HTML comments with a fixed prefix; the CPU scans the file and replaces them with live tag values, write-back fields, or fragments that the browser can render as standard HTML.

Essential AWP directives:

  • – marks a tag for read access (input to HTML).
  • – marks a tag for write access (output from HTML).
  • – defines symbolic enumerations for readable displays.
  • – references the enumeration inside a tag definition.
  • :=<TagName>: – tag value substitution inside body text.
  • :=<TagName>: – write-back field for HTML forms.

Every HTML file used as a custom page must be placed under the CPU's "Web pages" node in the TIA Portal project tree. The parent folder name becomes the application name in the URL. If the file index.html is dropped into a folder named automation, the URL becomes http://<CPU-IP>/awp/automation/index.html. The folder name is case-sensitive on the CPU.

Configuring a User-Defined Default Page

The CPU does not expose a configuration field for "default page". The accepted technique is to deliver a user-defined page named index.html as the first file in the application folder, and to instruct client browsers to navigate directly to that URL. Two configuration layers are involved: the project (TIA Portal) and the client (browser, SCADA thin client, or kiosk shell).

Step 1 – Author the Custom Page

  1. In the TIA Portal project, right-click the CPU and choose Web pages → Add new HTML file. Name the file index.html.
  2. Write the HTML body. A minimal operator alarm overview is shown below.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Plant Alarm Overview</title>
  <style>body{font-family:Arial,sans-serif;margin:2em}table{border-collapse:collapse}td,th{border:1px solid #888;padding:4px 8px}.ok{color:#080}.fault{color:#a00}</style>
</head>
<body>
  <h1>Plant Alarm Overview</h1>
  <!-- AWP_In_Variable Name="DB_Alarms".AlarmWord -->
  <!-- AWP_Enum_Def Name="AlarmState" Values="0:OK,1:Warning,2:Fault" -->
  <table>
    <tr><th>Tag</th><th>State</th></tr>
    <tr><td>Pump 1</td><td class="ok">:=DB_Alarms.Pump1:</td></tr>
    <tr><td>Pump 2</td><td class="fault">:=DB_Alarms.Pump2:</td></tr>
  </table>
</body>
</html>

Step 2 – Move the File to the Project Root

Confirm that the HTML file sits at the top of the Web pages folder, not inside a sub-folder. If the project contains sub-folders such as /styles/ or /img/, their paths are preserved during download to the DB. The first file the browser should land on remains index.html directly under awp/<AppName>/.

Step 3 – Compile and Download the Web DB

  1. Select the CPU in the project tree and click Compile → Software (rebuild all). TIA Portal regenerates the Web_DB containing every HTML fragment, AWP comment, and embedded image.
  2. Download the entire program (blocks + Web DB) to the CPU. The download is incremental: only the Web DB is updated if the user program itself is unchanged.

Step 4 – Configure the Client Bookmark or Kiosk Start URL

  1. On the operator PC, create a browser bookmark titled Plant Overview pointing to http://192.168.0.200/awp/automation/index.html.
  2. For kiosks running in full-screen mode, set the start page of the browser (or the SCADA thin client) to the same URL.
  3. Optionally, deploy an HTTP 302 redirect on a small intranet web server so that legacy http://<CPU-IP> requests are forwarded to the custom page.

URL Patterns and Parameter Reference

Address Pattern Description Example
http://<IP>/ Siemens default Introduction page http://192.168.0.200/
http://<IP>/awp/<AppName>/<File>.html User-defined HTML page (direct access) http://192.168.0.200/awp/automation/index.html
https://<IP>/awp/<AppName>/<File>.html Same as above, TLS-protected (FW V4.2+) https://192.168.0.200/awp/automation/index.html
http://<IP>/awp/<AppName>/ Directory listing of the user pages DB (if no index.html) http://192.168.0.200/awp/automation/
http://<IP>/Portal/Portal.mwsl Siemens diagnostics portal start http://192.168.0.200/Portal/Portal.mwsl
http://<IP>/?<Lang> Language override (en, de, fr, it, es, zh) http://192.168.0.200/?en

The application name corresponds to the folder under "Web pages" in the TIA Portal project. Spaces, umlauts, and non-ASCII characters in folder or file names are not recommended; browsers must URL-encode them, and the encoded form is often hard to distribute by hand.

Security and Access Control

Showing a custom page is only half of the task; the standard pages still exist at known URLs and may be opened by anyone on the network. The S7-1200 provides three layers of protection.

User Rights on the Web Server

Under Properties → Web server → User management, TIA Portal exposes three predefined roles: Administrator, Operator, and Read-only. The roles map to a permission matrix that controls diagnostics visibility, online program edits, and tag writes. Even if a non-privileged user reaches the Siemens default page, the diagnostics tree collapses to a read-only view and write-back HTML fields are disabled in the page source.

Role View Diagnostics Read Tags Write Tags Update Firmware Online Backup
Read-only Yes Yes No No No
Operator Yes Yes Yes (per tag list) No No
Administrator Yes Yes Yes Yes Yes

HTTPS / TLS

Firmware V4.2 introduced a TLS option. When enabled, the CPU serves all pages over HTTPS on the standard port 443 (or another configured port). A self-signed certificate is generated by the CPU on first boot. The custom page URL therefore changes to https://.... Browsers display a certificate warning; install the CPU certificate as a trusted root on the operator PC to suppress it.

Restricting Direct Access to Standard Pages

The CPU does not allow the standard Siemens pages to be hidden. The accepted mitigation is to set strong passwords for every user account and to instruct clients never to navigate to /Portal/Portal.mwsl. For deeper protection, a front-end intranet server can rewrite all traffic to the CPU and refuse any URL outside the /awp/... namespace.

Safety note: The S7-1200 web server is intended for diagnostics and visualization, not for safety-critical control. Never place SIL-rated logic on the web server, and isolate operator dashboards from safety I/O using a separate PROFINET subnet.

Hiding the Default Page Without Modifying the CPU

Several practical workarounds exist when project rules forbid changing the web DB on a locked-down CPU.

  1. Bookmark the custom page. Distribute http://<CPU-IP>/awp/<AppName>/index.html as the only entry point. Combined with "open previous tabs on startup" in most browsers, the operator never sees the Siemens landing page.
  2. Use a thin client or SCADA shell. Deploy a WinCC Unified, Ignition Edge, or a custom .NET application that hosts an embedded browser control. The shell hard-codes the start URL and disables the address bar.
  3. Reverse-proxy rewrite. Front the CPU with an nginx or Apache instance on a small IPC. Configure a 302 redirect from / to /awp/<AppName>/index.html and a deny rule for /Portal/.
  4. Browser kiosk mode. Run Chrome or Edge with --kiosk http://<CPU-IP>/awp/<AppName>/index.html --disable-pinch --overscroll-history-navigation=0. The user cannot type an address or open a new tab.

Troubleshooting Matrix

Symptom Probable Cause Diagnostic Step Corrective Action
Browser still shows Siemens Introduction page Operator bookmarked http://<IP>/ instead of the explicit /awp/... URL Inspect address bar; check the bookmark URL on the kiosk Re-bookmark with full /awp/<AppName>/index.html path
404 Not Found on /awp/automation/index.html Folder name in URL does not match the project tree, or index.html was not generated Open TIA Portal → CPU → Web pages and verify file name and folder Rename folder to match URL, recompile, re-download
Page loads but tag values are blank AWP_In_Variable declaration missing or pointing at a tag that is not optimised-accessible Check the diagnostic buffer for AWP parser warnings; inspect the Web DB Add the AWP declaration; switch the tag DB to "non-optimised" or use the explicit address
Certificate warning on HTTPS Self-signed CPU certificate not trusted on the client Export the certificate from the CPU (Web server → Certificates) and inspect the chain on the PC Install the CPU certificate under "Trusted Root Certification Authorities"
Tags read-only despite Operator role The role lacks write permission for the DB or the AWP_Out_Variable directive is missing Re-check the AWP_Out_Variable entries and the tag-level permission matrix Add AWP_Out_Variable, grant write access in user management
Web server returns "Web server not active" Web server disabled in device configuration or the "Activate web server on this module" checkbox is cleared Properties → Web server of the CPU Enable the web server, recompile, download
Slow page load on large projects Many embedded images or large DBs scanned by the AWP parser Profile with browser DevTools and inspect CPU diagnostics Externalise images to the front-end proxy, split the Web DB
HTML edits not visible at runtime Web DB not re-downloaded; the CPU serves a cached copy from internal flash Compare the Web DB block timestamp with the file timestamp in the project Force a full download (right-click CPU → Download to device → Software)

Verification

  1. Open a fresh browser session on a workstation in the same subnet. Navigate to the full custom URL, e.g. http://192.168.0.200/awp/automation/index.html. The custom page must render within two seconds on a 100 Mbit link.
  2. Confirm the source of the page in the browser (Ctrl+U). The HTML must contain your custom markup and AWP substitutions; the Siemens "Portal" header must not appear.
  3. Force a tag change in the PLC (set DB_Alarms.Pump1 = 1 in a watch table) and reload the page. The corresponding cell must reflect the new value without a CPU restart.
  4. Attempt to navigate manually to http://192.168.0.200/Portal/Portal.mwsl. The standard page must load, and any write-back fields must be locked if the logged-in role does not have write rights.
  5. Cycle power on the CPU. The custom page must still load from the internal flash; the Web DB survives power-off because it is part of the project download.

Differences Versus the S7-1500 Web Server

The S7-1500 web server uses a different AWP parser and a slightly different URL layout. Pages on the S7-1500 are addressed under /Portal/<AppName>/<File>.html, and the CPU exposes a configurable "Start page" property in the device configuration. The S7-1200, in contrast, hard-codes the Introduction page as the root and offers no such field. Any "default page" trick on the S7-1200 is therefore a client-side redirect or a URL bookmark, not a CPU setting. If a configurable start page is a hard requirement, evaluate the S7-1500 or the S7-1200 G2, where the firmware brings the start-page field closer to the S7-1500 behaviour.

Best Practices and Field-Proven Caveats

  • Keep the folder name short and ASCII-only. /awp/plant/ is more portable than /awp/Anlage_01_Süd/.
  • Externalise CSS and images when possible; the Web DB size is limited (firmware V4.0 supports up to about 10 MB depending on CPU type, and the parser scans every byte on every download).
  • Do not place write-back AWP fields on a page that the Operator role can reach without write permission; the parser silently strips them, which causes confusing "ghost" UI elements.
  • Use the language override (?en) on the introduction page to verify translations, but do not embed it in the custom page URL; the custom page does not translate.
  • Run a periodic offline backup of the Web DB through the CPU's online backup feature, especially when project changes are frequent.

FAQ

Can the S7-1200 web server be configured with a real default page like the S7-1500?

No. The S7-1200 firmware does not expose a "Start page" property. The accepted workaround is to bookmark the explicit http://<IP>/awp/<AppName>/index.html URL on every client, or to front the CPU with a reverse proxy that 302-redirects the root to the custom page.

What is the exact URL format for a user-defined HTML page?

The format is http://<CPU-IP>/awp/<ApplicationFolderName>/<FileName>.html. The application folder name must match the folder created under the CPU's Web pages node in TIA Portal and is case-sensitive. Example: http://192.168.0.200/awp/automation/index.html.

How do I stop operators from reaching the Siemens diagnostics pages?

Assign strong passwords to every user role in Properties → Web server → User management. Operators without the Administrator or Operator role see a read-only diagnostics view, and write-back fields in user-defined pages are disabled. For deeper protection, deploy a kiosk browser or a reverse proxy that denies any URL outside the /awp/... namespace.

Why does my custom page show blank tag values?

The most common cause is a missing declaration above the substitution, or the tag lives in an optimised-access DB that the web server cannot address. Add the AWP declaration and either switch the DB to non-optimised access or expose the tag through a non-optimised accessor block.

Does the S7-1200 support HTTPS for the web server?

Yes, starting with firmware V4.2. Enable TLS in Properties → Web server and install the CPU-generated certificate on every client workstation to suppress the browser's certificate warning. The custom page URL then becomes https://<CPU-IP>/awp/<AppName>/index.html.

Back to blog