# Hyperlinks in a custom webpart

I have a custom webpart which acts as a 'dashboard' showing product information on a subsite, and it needs to include a direct link to another subsite within the same site collection. Whenever I try to include a link, however, Sharepoint appends it to the existing site url.

The webpart uses ReactJS and REST to recall product information from a list on the parent site. The js file is referenced to via a Content Editor web part.

For example, I have the subsite "Project1" that I want to link to the "Project1A" subsite. Using javascript, I set up the html to render as:

<a href="https://sitename.sharepoint.com/sites/sitecollection/Project1A">


To help clarify, here's a snippet of my code where the link is generated (the URL is changed to protect my business' identity:

render(){
debugger;
return (
<div>
{this.state.items.map(function(item,key){
console.log(item)
return (
// Custom HTML to render Product Info Panel
<div style={divContainer} key={key}>
<div style={divProductinfo}>
<h1 style={h1Producttitle}>{item.Title}</h1>

• change it to <a href="https://sitename.sharepoint.com/sites/sitecollection/Project1A"> – Gautam Sheth Oct 24 '17 at 10:49
• Sorry, I was using shorthand for the example. "https://" is already included at the beginning of my link in the anchor tag. I've edited the original post to be more accurate. – Mark E Oct 24 '17 at 10:50

<a href="https://sitename.sharepoint.com/sites/sitecollection/Project1A">