Develop an algorithm to identify a domain name given a website.
https://www.example.com
user
algorithm to identify a domain name:

input: a website url
output: domain name from the website url.

1. start
2. remove 'http://' or 'https://' from the url if present.
3. find the first forward slash '/' in the url.
4. if forward slash '/' is not found, take the whole url as the domain name; otherwise, take the part of the url from the start of the url to the forward slash '/' as the domain name.
5. remove final '/' from the domain name.
6. end

example:
input: https://www.example.com
output: example.com
assistant
Algorithm to identify a domain name:

Input: A website URL
Output: Domain name from the website URL.

1. Start
2. Remove 'http://' or 'https://' from the URL if present.
3. Find the first forward slash '/' in the URL.
4. If forward slash '/' is not found, take the whole URL as the domain name; otherwise, take the part of the URL from the start of the URL to the forward slash '/' as the domain name.
5. Remove final '/' from the domain name.
6. End

Example:
Input: https://www.example.com
Output: example.com
assistant