Issue with Vue.js Router

I am having an issue causing me some confusion while using Vue.js. When I load localhost:8001/register it does not show the register page but rather shows the home page route. Any ideas on why this may be happening?

EDIT: The URL was http://localhost:8000/#/register not http://localhost:8000/register I just didn’t understand how Vue was handling routes.

src/router/index.js source

import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Register from '@/components/Register'


export default new Router({
  routes: [
      path: '/',
      name: 'Home',
      component: Home
      path: '/register',
      name: 'Register',
      component: Register

src/components/Register.vue source

  <div class="register" scoped>
    <h1>{{ msg }}</h1>
    <h2>About This Project</h2>
      <li><a href="">Contribute On GitHub</a></li>

export default {
  name: 'app'

<style scoped>


Just in case it went unoticed: here’s the doc page about history vs hashing route:

1 Like