How can I create internal links? Can someone please explain how site internal links work in Drupal? What is the most reliable way to display a link so that it goes to the same location every time?

I'm working on a preliminary website and right now, the only reliable way I can get a link to work the same way on all pages is to use absolute links (starting with http://and including the domain name for the host)  for each link. Since this website is currently local, this is not practical because I'll need to change all the links in the website when it goes live.

Eventually, I'd like to put these links in a menu I've got displayed at the top of all pages in my site.
In HTTP, links starting with http:// and including a domain name (e.g. http://example.com/foo/bar) is known as absolute paths.  On a Drupal site, they should only be used for off-site links.  Links not starting with http:// (e.g. /foo/bar) is known as relative paths. Relative paths should be used for internal links on your site. When a relative path starts with a slash (/) it is relative to the Drupal site root.  When it does not, it is relative to the location where it is embedded.

By making sure all internal links are specified using relative paths, they will not have to be changed when you move your site from one server to another.

For example, to link to /node/42, (provided you've clean URLs enabled) you can use the following markup:

 &lt;a href="/node/42"&gt;Link to node 42&lt;/a&gt;


(For menu items, as described bellow, you should omit the initial /, as menu items are always relative to the Drupal root.)


  Eventually, I'd like to put these links in a menu I've got displayed at the top of all pages in my site.


Support for this use case is already in place in Drupal.

Navigate to: Administration » Structure »  Menus and click on the link "List links" for the Main menu.  Then click on Add link.  In the field "Path" type in the relative path to the location (e.g. node path) in your site you want this menu item to point. Also provide meaningful "Menu link title" and "Description" strings.  End by clicking Save. Now the link will appear in your main menu, which in most (including the default "Bartik") themes are displayed at the top of all pages on the site.