title: Next.js - Error: only absolute urls are supported
body: <p>I'm using express as my custom server for next.js. Everything is fine, when I click the products to the list of products</p>
  
  <p><strong>Step 1</strong>: I click the product Link</p>
  
  <p><a href="https://i.stack.imgur.com/3UTd4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3UTd4.png" alt="enter image description here"></a></p>
  
  <p><strong>Step 2</strong>: It will show the products in the database.</p>
  
  <p><a href="https://i.stack.imgur.com/FRssJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FRssJ.png" alt="enter image description here"></a></p>
  
  <p>However if I refresh the <code>/products</code> page, I will get this Error</p>
  
  <p><a href="https://i.stack.imgur.com/gppNu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gppNu.png" alt="enter image description here"></a></p>
  
  <p>Server code (Look at <code>/products</code> endpoint)</p>
  
  <pre><code>app.prepare()
  .then(() =&gt; {
    const server = express()
  
    // This is the endpoints for products
    server.get('/api/products', (req, res, next) =&gt; {
      // Im using Mongoose to return the data from the database
      Product.find({}, (err, products) =&gt; {
        res.send(products)
      })
    })
  
    server.get('*', (req, res) =&gt; {
      return handle(req, res)
    })
  
    server.listen(3000, (err) =&gt; {
      if (err) throw err
      console.log('&gt; Ready on http://localhost:3000')
    })
  })
  .catch((ex) =&gt; {
    console.error(ex.stack)
    process.exit(1)
  })
  </code></pre>
  
  <p>Pages - products.js (Simple layout that will loop the products json data)</p>
  
  <pre><code>import Layout from '../components/MyLayout.js'
  import Link from 'next/link'
  import fetch from 'isomorphic-unfetch'
  
  const Products = (props) =&gt; (
    &lt;Layout&gt;
      &lt;h1&gt;List of Products&lt;/h1&gt;
      &lt;ul&gt;
        { props.products.map((product) =&gt; (
          &lt;li key={product._id}&gt;{ product.title }&lt;/li&gt;
        ))}
      &lt;/ul&gt;
    &lt;/Layout&gt;
  )
  
  Products.getInitialProps = async function() {
  
    const res = await fetch('/api/products')
    const data = await res.json()
  
    console.log(data)
    console.log(`Showed data fetched. Count ${data.length}`)
  
    return {
      products: data
    }
  }
  
  export default Products
  </code></pre>