---
schema_version: "1"
id: 7e849647b055d3efbaa16047bcad55affd45566b03e2219316844bd84619cc66
title: Navigate to a Web Page
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-navigation-web-page.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-navigation-web-page.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2164f7b8dd997cd0548d3fe766af3cd345f2e1729a6ec83e5a1ac81946279326
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Navigate to a Web Page

The navigation service supports different kinds of pages in Lightning. Each page reference type supports a different set of attributes and state properties.

Instead of using `force:navigateToURL`, we recommend navigating to web pages using the `lightning:navigate` component with the `standard__webPage` page type.

This code shows examples of navigating to a web page using the old `force:navigateToURL` event.

```nolang
// Old way to navigate to a web page
$A.get("markup://force:navigateToURL").setParams({ 
    url: 'https://salesforce.com', 
}).fire();
```

Replace the previous code that uses `force:navigateToURL` with the following code. This example shows how to navigate to a web page using the `standard__webPage` page type. It assumes that you added `<lightning:navigation aura:id="navigationService" />` in your component markup.

```javascript
cmp.find("navigationService").navigate({ 
    type: "standard__webPage", 
    attributes: { 
        url: 'https://salesforce.com' 
    } 
});
```

