# Function urlsAreSameOrigin

- urlsAreSameOrigin(url1, url2): boolean

- Determine if two URLs share the same origin.

  #### Parameters

  - url1: any

    First URL to compare as a string or a normalized URL in the form of a dictionary object returned by `urlResolve()`.

  - url2: any

    Second URL to compare as a string or a normalized URL in the form of a dictionary object returned by `urlResolve()`.

  #### Returns boolean

  - True if both URLs have the same origin, and false otherwise.
  - Defined in core/url-utils/url-utils.js:117