With certain configurations, links of the Magento installation can show up with an additional /magento/
in the url. Most likely, this is because web server rewrites are turned off.
Navigate to Stores > Configuration > General > Web > Search Engine Optimization and set the field Use Web Server Rewrites to Yes. When this setting is updated, a full reindex is required for the changes to take effect.