> `is_page('example.com/account')`

That's not the correct syntax for checking against a Page *slug*. Don't include the domain name; just use the slug alone, i.e. `is_page( 'account' )` if the slug is `account`. See the [documentation](https://developer.wordpress.org/reference/functions/is_page/) for more information about the function.

Your [`wp_redirect()`](https://developer.wordpress.org/reference/functions/wp_redirect/) syntax is also not good — if you wanted to redirect to a Page with the slug `login` on your site, you could use [`home_url()`](https://developer.wordpress.org/reference/functions/home_url/) like this: `home_url( '/login/' )`. If you wanted to redirect to an external site, then use a fully-qualified URL like `https://example.com/login` and not just `example.com/login`.

So try with `is_page()` once again, but use the correct syntax:

```php
function redirect_if_user_not_logged_in() {
	if ( !is_user_logged_in() && is_page( 'account' ) ) {
		wp_redirect( home_url( '/login/' ) );
		exit;
	}
}
```