Error creating site collection - URL in use as alternate access URL or as the URL of a host header site

Sep 5, 2013 at 9:54 PM
I am setting up a new small farm with 2 servers, 1 SQL (SQL 2012 R2 SP1) and 1 Sharepoint 2013 Enterprise server (both App and WFE).

On the 'Creating Site Collection' step, I am getting an error which reads:
  • Creating web applications...
    • Web app "Portal" already provisioned.
    • Setting up managed paths for "http://sharepoint:80"
    • Done setting up managed paths at "http://sharepoint:80"
    • Granting PMC\spusrac rights to "Portal"...Done.

- Creating Site Collection "http://sharepoint"...

  • Script halted!
Exception : System.ArgumentException: The URL 'http://sharepoint' is in use as an alternate access URL or as the URL of a host header site. Please choose a different URL and try again.

This is the statement:
            $site = New-SPSite -Url $siteURL -OwnerAlias $ownerAlias -SecondaryOwnerAlias $env:USERDOMAIN\$env:USERNAME -ContentDatabase $database -Description $siteCollectionName -Name $siteCollectionName -Language $LCID @templateSwitch @hostHeaderWebAppSwitch -ErrorAction Stop
?? How can I determine what AAM or host header is using the http://sharepoint URL? Can the site url and the IIS URL not be the same? I appreciate any direction. Thanks.
Sep 6, 2013 at 11:11 PM
They can be the same change:
<ManagedPath relativeUrl="help" explicit="true" />
                    TO
<ManagedPath relativeUrl="help" explicit="false" />