undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. SEO Tactics
  3. On-Page Optimization
  4. Wordpress & trailing slash on domain name

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Wordpress & trailing slash on domain name

On-Page Optimization
3
8
2.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • Jon-C
    Jon-C last edited by Feb 8, 2013, 11:30 AM

    Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as

    www.domian.co.uk

    but since moving to wordpress my domain is now having a slash put on the end of it like

    www.domain.co.uk/

    Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?

    If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)

    Thanks

    T

    1 Reply Last reply Reply Quote 0
    • Jon-C
      Jon-C @Jon-C last edited by Feb 8, 2013, 6:30 PM Feb 8, 2013, 6:30 PM

      Takeshi, that was great thank you 🙂

      1 Reply Last reply Reply Quote 0
      • TakeshiYoung
        TakeshiYoung @Jon-C last edited by Feb 8, 2013, 6:31 PM Feb 8, 2013, 5:36 PM

        Try this:

        <code># BEGIN WordPress  <IfModule mod_rewrite.c>  RewriteEngine  On  RewriteBase  /  RewriteRule  ^index\.php$ -  [L]  RewriteRule  (.+)/$ $1 [R=301,L]  RewriteCond  %{REQUEST_FILENAME}  !-f RewriteCond  %{REQUEST_FILENAME}  !-d RewriteRule  .  /index.php [L]  IfModule></code>
        
        1 Reply Last reply Reply Quote 1
        • Jon-C
          Jon-C @Jon-C last edited by Feb 8, 2013, 4:24 PM Feb 8, 2013, 4:24 PM

          Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on

          RewriteBase /newsite/ or do I have to strip out a few more?

          Don't like messing with my hataccess so any help to point me in the right direction would be great!

          # BEGIN WordPress
           <ifmodule mod_rewrite.c="">RewriteEngine On
          RewriteBase /newsite/
          RewriteRule ^index\.php$ - [L]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . /newsite/index.php [L]</ifmodule> 
          
          # END WordPress
          
          
          1 Reply Last reply Reply Quote 0
          • Jon-C
            Jon-C @Jon-C last edited by Feb 8, 2013, 2:30 PM Feb 8, 2013, 2:30 PM

            Good point!

            Just checked and www.domain.co.uk redirects to www.domain.co.uk/

            This a htaccess issue perhaps?

            1 Reply Last reply Reply Quote 0
            • Martin_Harris
              Martin_Harris @Jon-C last edited by Feb 8, 2013, 12:45 PM Feb 8, 2013, 12:45 PM

              Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?

              1 Reply Last reply Reply Quote 0
              • Jon-C
                Jon-C @Martin_Harris last edited by Feb 8, 2013, 12:39 PM Feb 8, 2013, 12:39 PM

                Self hosted!

                I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site

                Martin_Harris Jon-C TakeshiYoung 5 Replies Last reply Feb 8, 2013, 6:30 PM Reply Quote 0
                • Martin_Harris
                  Martin_Harris last edited by Feb 8, 2013, 12:09 PM Feb 8, 2013, 12:09 PM

                  Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.

                  Jon-C 1 Reply Last reply Feb 8, 2013, 12:39 PM Reply Quote 0
                  • 1 / 1
                  1 out of 8
                  • First post
                    1/8
                    Last post

                  Got a burning SEO question?

                  Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                  Start my free trial


                  Browse Questions

                  Explore more categories

                  • Moz Tools

                    Chat with the community about the Moz tools.

                  • SEO Tactics

                    Discuss the SEO process with fellow marketers

                  • Community

                    Discuss industry events, jobs, and news!

                  • Digital Marketing

                    Chat about tactics outside of SEO

                  • Research & Trends

                    Dive into research and trends in the search industry.

                  • Support

                    Connect on product support and feature requests.

                  • See all categories

                  Related Questions

                  • AslanBarselinov

                    Correct robots.txt for WordPress

                    Hi. So I recently launched a website on WordPress (1 main page and 5 internal pages). The main page got indexed right off the bat, while other pages seem to be blocked by robots.txt. Would you please look at my robots file and tell me what‘s wrong? I wanted to block the contact page, plugin elements, users’ comments (I got a discussion space on every page of my website) and website search section (to prevent duplicate pages from appearing in google search results). Looks like one of the lines is blocking every page after ”/“ from indexing, even though everything seems right. Thank you so much. FzSQkqB.jpg

                    On-Page Optimization | Jun 24, 2019, 1:36 AM | AslanBarselinov
                    1
                  • SeobyKP

                    How many hyphens are allowed in page titles or image names?

                    When I was going through certification, I was told it should be limited to one or two. I was curious if there is a change.

                    On-Page Optimization | Jul 10, 2018, 6:36 AM | SeobyKP
                    0
                  • harry550

                    Ranking & Visibility suddenly Down for my website

                    Any google updates or, can anyone tell me what google running, web ranking down, majority keywords showing on 1st pages right now those are on 3rd page, so is there any specific reason, or any solutions plz.. this s my website www.iqlance.com can anyone help me to audit and what was the issues facing exactly..

                    On-Page Optimization | May 22, 2024, 9:20 AM | harry550
                    1
                  • kevinbp

                    My main domain is missing in google, subdomain appears instead.

                    I have two SEO optimised pages in my website targeting different keywords www.example.com                 <-- main selling page (Pocket Guitar | Guitar Instruments)
                    www.example.com/index/       <-- 2nd selling page (Guitar Australia | Guitar Perth) Q: At first my website "www.example.com" is ranking on google first page. Suddenly it disappears and the link "www.example.com/index/" appears instead. No matter what i search, "Pocket Guitar | Guitar Instruments | Guitar Australia | Guitar Perth", the link www.example.com/index/ appears on the front page instead of www.example.com. What is happening to my main domain? Should i be worried?

                    On-Page Optimization | Jan 11, 2015, 11:27 AM | kevinbp
                    0
                  • bubblymaiko

                    [HELP!] File Name and ALT Tags

                    Hi, please answer my questions: 1. Is it okay to use the same keyword on both file name and alt tags when inserting an image? Example: File Name: buy-lego-online.jpg ALT tag: buy-lego-online Will it trigger Google Panda? Will I be penalized for that? Or the file name and alt tags should be different from each other? Because when inserting an image on Wordpress, the alt tags are always the same as the file name by default. 2. For example, I have 2 images in a page (same topic/niche) and I will put "cheap-lego-for-kids" and "best-lego-for-sale" as alt tags. Considering that I repeat the word "lego", is it considered keyword stuffing? Will I be penalized for that? Thanks in advance!

                    On-Page Optimization | Jan 8, 2015, 1:28 PM | bubblymaiko
                    0
                  • OSD

                    Image naming best practices?

                    While I have found many good sources of information for naming images for SEO purposes, I'm having trouble finding an up-to-date, exhaustive and authoritative source for image names, alt tags, etc. For instance... Max characters for image name? Max hyphens? How descriptive should you be? "ice-cream-flavors-icon_._jpg" or "ice-cream-flavors.jpg" or simply "ice-cream.jpg" How similar should the image name, alt text and page title be? At what point are you overusing a keyword? Rules to follow? So much more, but you get the idea! Anyone have a good reference or an answer to all things related to images and SEO? Thanks!

                    On-Page Optimization | Jul 10, 2014, 12:22 PM | OSD
                    0
                  • mihaiaperghis

                    WordPress and category/subcategory landing pages

                    Hey, Here's my situation. I'm building a WordPress blog for product reviews of a certain niche. Current category setup is 4 main categories with 4-8 subcategories each. Each subcategory has a unique description that will help it become a landing page for certain keywords, after which it lists the posts from that subcategory. The posts will always be assigned to a sub-category, never to a main category. My issue is what to do with the main categories. They're fairly general so they're not really targeting any keywords, and don't have any unique descriptions attached to them. I was thinking of choosing between three options on designing the main category pages: List the subcategories + normal posts loop that bring the latest posts from the subcategories (may create a lot of duplicate content since the subcategory pages are also listing their posts) List only the subcategories (+ maybe just the latest post from each subcategory) Don't link the main categories at all, instead only use them to create dropdowns for the subcategories So, what would you choose, and why?

                    On-Page Optimization | Mar 11, 2013, 2:45 PM | mihaiaperghis
                    0
                  • BistosAmerica

                    Wordpress category links not working

                    Hi All of sudden, my category links are not working. Any tips on figuring out what's causing this? Looks like permalink problem with newer wordpress version. I turned off all the plugins see if this cause any problems.  Still not being able to find any option. Here's my site http://www.hibebefetaldoppler.com/fetal-doppler-questions-and-answers/ Thanks in advance

                    On-Page Optimization | Aug 6, 2012, 11:18 AM | BistosAmerica
                    0

                  Get started with Moz Pro!

                  Unlock the power of advanced SEO tools and data-driven insights.

                  Start my free trial
                  Products
                  • Moz Pro
                  • Moz Local
                  • Moz API
                  • Moz Data
                  • STAT
                  • Product Updates
                  Moz Solutions
                  • SMB Solutions
                  • Agency Solutions
                  • Enterprise Solutions
                  Free SEO Tools
                  • Domain Authority Checker
                  • Link Explorer
                  • Keyword Explorer
                  • Competitive Research
                  • Brand Authority Checker
                  • Local Citation Checker
                  • MozBar Extension
                  • MozCast
                  Resources
                  • Blog
                  • SEO Learning Center
                  • Help Hub
                  • Beginner's Guide to SEO
                  • How-to Guides
                  • Moz Academy
                  • API Docs
                  About Moz
                  • About
                  • Team
                  • Careers
                  • Contact
                  Why Moz
                  • Case Studies
                  • Testimonials
                  Get Involved
                  • Become an Affiliate
                  • MozCon
                  • Webinars
                  • Practical Marketer Series
                  • MozPod
                  Connect with us

                  Contact the Help team

                  Join our newsletter
                  Moz logo
                  © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy

                  Looks like your connection to Moz was lost, please wait while we try to reconnect.